aboutsummaryrefslogtreecommitdiff
path: root/tests/test/script/generated
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test/script/generated')
-rw-r--r--tests/test/script/generated/buildfile8
-rw-r--r--tests/test/script/generated/driver.cxx11
-rw-r--r--tests/test/script/generated/testscript34
-rw-r--r--tests/test/script/generated/testscript.in5
4 files changed, 58 insertions, 0 deletions
diff --git a/tests/test/script/generated/buildfile b/tests/test/script/generated/buildfile
new file mode 100644
index 0000000..c27b49d
--- /dev/null
+++ b/tests/test/script/generated/buildfile
@@ -0,0 +1,8 @@
+# file : tests/test/script/generated/buildfile
+# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
+# license : MIT; see accompanying LICENSE file
+
+# Test generated testscripts.
+#
+
+./: test{testscript} $b file{*.cxx +*.in}
diff --git a/tests/test/script/generated/driver.cxx b/tests/test/script/generated/driver.cxx
new file mode 100644
index 0000000..e155462
--- /dev/null
+++ b/tests/test/script/generated/driver.cxx
@@ -0,0 +1,11 @@
+// file : tests/test/script/generated/driver.cxx -*- C++ -*-
+// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
+// license : MIT; see accompanying LICENSE file
+
+#include <iostream>
+
+int
+main ()
+{
+ std::cout << "1.2.3" << std::endl;
+}
diff --git a/tests/test/script/generated/testscript b/tests/test/script/generated/testscript
new file mode 100644
index 0000000..572c73f
--- /dev/null
+++ b/tests/test/script/generated/testscript
@@ -0,0 +1,34 @@
+# file : tests/test/script/generated/testscript
+# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
+# license : MIT; see accompanying LICENSE file
+
+test.arguments = test clean
+
+# Note: using common.test from test/, not script/.
+#
+.include ../../common.test
+
+# @@ in module
+#
++cat <<EOI >+build/bootstrap.build
+using version
+EOI
++cat <<EOI >=manifest
+: 1
+name: test
+version: 1.2.3
+EOI
+
++cat <<EOI >=build/root.build
+using cxx
+EOI
+
+: testscript
+:
+ln -s $src_base/driver.cxx ./;
+ln -s $src_base/testscript.in ./;
+$* <<EOI
+exe{driver}: cxx{driver} test{testscript}
+test{testscript}: in{testscript} $src_root/file{manifest} #@@ in module
+test{testscript}: in.symbol = '@'
+EOI
diff --git a/tests/test/script/generated/testscript.in b/tests/test/script/generated/testscript.in
new file mode 100644
index 0000000..b030b39
--- /dev/null
+++ b/tests/test/script/generated/testscript.in
@@ -0,0 +1,5 @@
+# file : tests/test/script/generated/testscript.in
+# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
+# license : MIT; see accompanying LICENSE file
+
+$* >'@version@'