aboutsummaryrefslogtreecommitdiff
path: root/tests/test/script/builtin/cat.test
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-11-10 00:26:54 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2016-11-15 16:46:10 +0300
commita7efabf301f23364ac2335c80c5e1e712bc43204 (patch)
treedded192f09627702bc8e0566c5c6032825d6920c /tests/test/script/builtin/cat.test
parent05b1d9e89a94ee5594168073b8dc363fada987f1 (diff)
Add cat, false and true builtins
Diffstat (limited to 'tests/test/script/builtin/cat.test')
-rw-r--r--tests/test/script/builtin/cat.test57
1 files changed, 57 insertions, 0 deletions
diff --git a/tests/test/script/builtin/cat.test b/tests/test/script/builtin/cat.test
new file mode 100644
index 0000000..7797906
--- /dev/null
+++ b/tests/test/script/builtin/cat.test
@@ -0,0 +1,57 @@
+# file : tests/test/script/runner/cat.test
+# copyright : Copyright (c) 2014-2016 Code Synthesis Ltd
+# license : MIT; see accompanying LICENSE file
+
+: in
+:
+cat <<EOI >>EOO
+foo
+bar
+EOI
+foo
+bar
+EOO
+
+: dash
+:
+cat - <<EOI >>EOO
+foo
+bar
+EOI
+foo
+bar
+EOO
+
+: file
+:
+cat <<EOI >>>out;
+foo
+bar
+EOI
+cat out >>EOO
+foo
+bar
+EOO
+
+: in-repeat
+:
+cat - <<EOI >>EOO
+foo
+bar
+EOI
+foo
+bar
+EOO
+
+: non-existent
+:
+cat in 2>- != 0 # @@ REGEX
+
+: empty-path
+:
+: Cat an empty path.
+:
+cat '' 2>"cat: invalid path ''" == 1
+
+# @@ When piping is ready test cat on a big file to test it is asynchronous.
+#