summaryrefslogtreecommitdiffstats
path: root/test cases/d/2 static library
diff options
context:
space:
mode:
Diffstat (limited to 'test cases/d/2 static library')
-rw-r--r--test cases/d/2 static library/app.d8
-rw-r--r--test cases/d/2 static library/libstuff.d9
-rw-r--r--test cases/d/2 static library/meson.build5
-rw-r--r--test cases/d/2 static library/test.json7
4 files changed, 29 insertions, 0 deletions
diff --git a/test cases/d/2 static library/app.d b/test cases/d/2 static library/app.d
new file mode 100644
index 0000000..5d84a69
--- /dev/null
+++ b/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/test cases/d/2 static library/libstuff.d b/test cases/d/2 static library/libstuff.d
new file mode 100644
index 0000000..fd3b4d0
--- /dev/null
+++ b/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/test cases/d/2 static library/meson.build b/test cases/d/2 static library/meson.build
new file mode 100644
index 0000000..88ed2cb
--- /dev/null
+++ b/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/test cases/d/2 static library/test.json b/test cases/d/2 static library/test.json
new file mode 100644
index 0000000..6abb934
--- /dev/null
+++ b/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"}
+ ]
+}