aboutsummaryrefslogtreecommitdiff
path: root/tests/test
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-10-28 17:45:49 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-11-04 09:26:36 +0200
commitea84c30622ea265b38ec7235c707f8b75df78b16 (patch)
tree9db59bd274b1a5700ea426320f48da2372ed29f1 /tests/test
parent934c157361eabf6d440c95d575aba24ebf1b445f (diff)
Update testscripts
Diffstat (limited to 'tests/test')
-rw-r--r--tests/test/script/integration/testscript10
-rw-r--r--tests/test/script/runner/cleanup.test20
-rw-r--r--tests/test/script/runner/status.test2
3 files changed, 23 insertions, 9 deletions
diff --git a/tests/test/script/integration/testscript b/tests/test/script/integration/testscript
index a9c29a7..27c1a5d 100644
--- a/tests/test/script/integration/testscript
+++ b/tests/test/script/integration/testscript
@@ -2,7 +2,7 @@
# copyright : Copyright (c) 2014-2016 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
-test.options += --buildfile -
+test.options += -q --buildfile -
test.arguments = test
+mkdir build
@@ -21,22 +21,17 @@ test.arguments = test
./: test{../testscript ../foo}
EOI
error: both 'testscript' and other names specified for dir{./}
-info: while testing dir{./}
EOE
$* <<EOI 2>>EOE != 0
./: test{../foo ../testscript}
EOI
error: both 'testscript' and other names specified for dir{./}
-info: while testing dir{./}
EOE
- $* <<EOI 2>>EOE
+ $* <<EOI
./: test{../foo ../bar}
EOI
-test dir{./} with ../test{foo}
-test dir{./} with ../test{bar}
-EOE
-rm -f testscript foo.test bar.test
}
@@ -50,7 +45,6 @@ $* <<EOI 2>>EOE != 0;
./: test{foo}
EOI
error: working directory test/ is not empty at the beginning of the test
-info: while testing dir{./}
EOE
rm -f test/dummy foo.test;
rmdir test
diff --git a/tests/test/script/runner/cleanup.test b/tests/test/script/runner/cleanup.test
index 76cff63..9a660d5 100644
--- a/tests/test/script/runner/cleanup.test
+++ b/tests/test/script/runner/cleanup.test
@@ -2,9 +2,29 @@
# copyright : Copyright (c) 2014-2016 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
++mkdir build &build/ # @@ Should not be necessary once builtin.
++cat <<EOI >>>build/boostrap.build
+project = test
+amalgamation =
+
+using test
+EOI
+
+b = $build.driver -q --no-column --buildfile - <"./: test{testscript}" \
+ &test/ test
+c = cat >>>testscript
+
$* -f a &a # file
$* -d a &a/ # dir1
$* -d a/b &a/ &a/b/ # dir2
$* -d a/b -f a/b/c &a/ &a/b/ &a/b/c # file-dir
$* -f a &a &a # file-dup
$* -d a/b &a/ &a/b/ &a/b/../b/ # dir-dup
+
+# <test-id>
+#
+# @@ TODO: $c <"$* &a/" && $b 2>>EOE
+$c <"$* &a/";
+$b 2>>EOE != 0
+testscript:1: error: registered for cleanup directory test/1/a/ does not exist
+EOE
diff --git a/tests/test/script/runner/status.test b/tests/test/script/runner/status.test
index 5d4d116..0ef1ee9 100644
--- a/tests/test/script/runner/status.test
+++ b/tests/test/script/runner/status.test
@@ -2,7 +2,7 @@
# copyright : Copyright (c) 2014-2016 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
-$* # status-def
+$* # status-def @@ status- is already in file name
$* == 0 # status-eq-0
$* -s 1 != 0 # status-ne-0
$* -s 1 == 1 # status-eq-1