summaryrefslogtreecommitdiffstats
path: root/test cases/d/1 simple
diff options
context:
space:
mode:
Diffstat (limited to 'test cases/d/1 simple')
-rw-r--r--test cases/d/1 simple/app.d8
-rw-r--r--test cases/d/1 simple/meson.build4
-rw-r--r--test cases/d/1 simple/test.json6
-rw-r--r--test cases/d/1 simple/utils.d8
4 files changed, 26 insertions, 0 deletions
diff --git a/test cases/d/1 simple/app.d b/test cases/d/1 simple/app.d
new file mode 100644
index 0000000..0be1d2c
--- /dev/null
+++ b/test cases/d/1 simple/app.d
@@ -0,0 +1,8 @@
+
+import std.stdio;
+import utils;
+
+void main ()
+{
+ printGreeting ("a Meson D test");
+}
diff --git a/test cases/d/1 simple/meson.build b/test cases/d/1 simple/meson.build
new file mode 100644
index 0000000..a10b67b
--- /dev/null
+++ b/test cases/d/1 simple/meson.build
@@ -0,0 +1,4 @@
+project('D Simple Test', 'd')
+
+e = executable('dsimpleapp', ['app.d', 'utils.d'], install : true)
+test('apptest', e)
diff --git a/test cases/d/1 simple/test.json b/test cases/d/1 simple/test.json
new file mode 100644
index 0000000..62f907a
--- /dev/null
+++ b/test cases/d/1 simple/test.json
@@ -0,0 +1,6 @@
+{
+ "installed": [
+ {"type": "exe", "file": "usr/bin/dsimpleapp"},
+ {"type": "pdb", "file": "usr/bin/dsimpleapp", "language": "d"}
+ ]
+}
diff --git a/test cases/d/1 simple/utils.d b/test cases/d/1 simple/utils.d
new file mode 100644
index 0000000..8645548
--- /dev/null
+++ b/test cases/d/1 simple/utils.d
@@ -0,0 +1,8 @@
+
+import std.stdio;
+import std.string : format;
+
+void printGreeting (string name)
+{
+ writeln ("Hello, I am %s.".format (name));
+}