aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test/script/runner/buildfile2
-rw-r--r--tests/test/script/runner/redirect.test (renamed from tests/test/script/runner/testscript)33
-rw-r--r--tests/test/script/runner/status.test9
3 files changed, 35 insertions, 9 deletions
diff --git a/tests/test/script/runner/buildfile b/tests/test/script/runner/buildfile
index c91f940..ddab8a5 100644
--- a/tests/test/script/runner/buildfile
+++ b/tests/test/script/runner/buildfile
@@ -2,6 +2,6 @@
# copyright : Copyright (c) 2014-2016 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
-exe{driver}: cxx{driver} test{testscript}
+exe{driver}: cxx{driver} test{redirect status}
include ../../../../../build2/
diff --git a/tests/test/script/runner/testscript b/tests/test/script/runner/redirect.test
index c95ed07..a49cd3c 100644
--- a/tests/test/script/runner/testscript
+++ b/tests/test/script/runner/redirect.test
@@ -1,13 +1,7 @@
-# file : tests/test/script/runner/testscript
+# file : tests/test/script/runner/redirect.test
# copyright : Copyright (c) 2014-2016 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
-$* # status-def
-$* == 0 # status-eq-0
-$* -s 1 != 0 # status-ne-0
-$* -s 1 == 1 # status-eq-1
-$* != 1 # status-ne-1
-
$* -o foo >- # out-null
$* -e foo 2>- # err-null
$* -i 0 <foo # in-str
@@ -109,9 +103,32 @@ EOI
EOO
-$* -o foo >>>out; # file-redirect
+$* -o foo >>>out; # file
$* -e bar 2>>>&out;
$* -i 1 <<<out >>EOO
foo
bar
EOO
+
+$* -o foo -e bar 2>>EOE 1>&2 # merge-str
+foo
+bar
+EOE
+
+$* -i 1 <<EOI -e baz >>EOO 2>&1 # merge-doc
+foo
+bar
+EOI
+foo
+bar
+baz
+EOO
+
+$* -o foo -e bar 2>&1 >>>out; # merge-file
+$* -e baz -o biz 1>&2 2>>>&out;
+$* -i 1 <<<out >>EOO
+foo
+bar
+baz
+biz
+EOO
diff --git a/tests/test/script/runner/status.test b/tests/test/script/runner/status.test
new file mode 100644
index 0000000..5d4d116
--- /dev/null
+++ b/tests/test/script/runner/status.test
@@ -0,0 +1,9 @@
+# file : tests/test/script/runner/status.tests
+# copyright : Copyright (c) 2014-2016 Code Synthesis Ltd
+# license : MIT; see accompanying LICENSE file
+
+$* # status-def
+$* == 0 # status-eq-0
+$* -s 1 != 0 # status-ne-0
+$* -s 1 == 1 # status-eq-1
+$* != 1 # status-ne-1