diff options
author | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
---|---|---|
committer | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
commit | af1a266670d040d2f4083ff309d732d648afba2a (patch) | |
tree | 2fc46203448ddcc6f81546d379abfaeb323575e9 /meson/test cases/d/2 static library | |
parent | e02cda008591317b1625707ff8e115a4841aa889 (diff) |
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'meson/test cases/d/2 static library')
-rw-r--r-- | meson/test cases/d/2 static library/app.d | 8 | ||||
-rw-r--r-- | meson/test cases/d/2 static library/libstuff.d | 9 | ||||
-rw-r--r-- | meson/test cases/d/2 static library/meson.build | 5 | ||||
-rw-r--r-- | meson/test cases/d/2 static library/test.json | 7 |
4 files changed, 29 insertions, 0 deletions
diff --git a/meson/test cases/d/2 static library/app.d b/meson/test cases/d/2 static library/app.d new file mode 100644 index 000000000..5d84a6942 --- /dev/null +++ b/meson/test cases/d/2 static library/app.d @@ -0,0 +1,8 @@ + +import libstuff; + +void main () +{ + immutable ret = printLibraryString ("foo"); + assert (ret == 4); +} diff --git a/meson/test cases/d/2 static library/libstuff.d b/meson/test cases/d/2 static library/libstuff.d new file mode 100644 index 000000000..fd3b4d0b4 --- /dev/null +++ b/meson/test cases/d/2 static library/libstuff.d @@ -0,0 +1,9 @@ + +import std.stdio; +import std.string : format; + +int printLibraryString (string str) +{ + writeln ("Static Library says: %s".format (str)); + return 4; +} diff --git a/meson/test cases/d/2 static library/meson.build b/meson/test cases/d/2 static library/meson.build new file mode 100644 index 000000000..88ed2cb8f --- /dev/null +++ b/meson/test cases/d/2 static library/meson.build @@ -0,0 +1,5 @@ +project('D Static Library', 'd') + +lstatic = static_library('stuff', 'libstuff.d', install : true) +es = executable('app_s', 'app.d', link_with : lstatic, install : true) +test('linktest_static', es) diff --git a/meson/test cases/d/2 static library/test.json b/meson/test cases/d/2 static library/test.json new file mode 100644 index 000000000..6abb93409 --- /dev/null +++ b/meson/test cases/d/2 static library/test.json @@ -0,0 +1,7 @@ +{ + "installed": [ + {"type": "exe", "file": "usr/bin/app_s"}, + {"type": "pdb", "file": "usr/bin/app_s", "language": "d"}, + {"type": "file", "file": "usr/lib/libstuff.a"} + ] +} |