diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2016-12-31 03:14:50 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2017-01-05 15:30:49 +0300 |
commit | b917233d4b618d587f569706d8d528b051efdba4 (patch) | |
tree | 1ff132a7299cb962a5be4be3a4b0fadeea2141f3 /tests/test/script/builtin/cat.test | |
parent | e1837dc7da78055ab3e355c3e941a7415146c1b8 (diff) |
Tests cleanup
Diffstat (limited to 'tests/test/script/builtin/cat.test')
-rw-r--r-- | tests/test/script/builtin/cat.test | 40 |
1 files changed, 28 insertions, 12 deletions
diff --git a/tests/test/script/builtin/cat.test b/tests/test/script/builtin/cat.test index 5049ca9..20cdb86 100644 --- a/tests/test/script/builtin/cat.test +++ b/tests/test/script/builtin/cat.test @@ -2,66 +2,82 @@ # copyright : Copyright (c) 2014-2016 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file -# @@ I think these should be run indirectly (via cat & build) -# for cross-testing to work (we want to run the via the build -# system we built, not the one we used to acomplish this. +.include ../common.test : in : -cat <<EOI >>EOO +$c <<EOI; +cat <<EOF >>EOO foo bar -EOI +EOF foo bar EOO +EOI +$b : dash : -cat - <<EOI >>EOO +$c <<EOI; +cat - <<EOF >>EOO foo bar -EOI +EOF foo bar EOO +EOI +$b : file : -cat <<EOI >>>out; +$c <<EOI; +cat <<EOF >>>out; foo bar -EOI +EOF cat out >>EOO foo bar EOO +EOI +$b : in-repeat : -cat - <<EOI >>EOO +$c <<EOI; +cat - <<EOF >>EOO foo bar -EOI +EOF foo bar EOO +EOI +$b : non-existent : : Note that there is an optional trailing blank line in the regex that matches : the newline added by msvcrt as a part of the error description. : +$c <<EOI; cat in 2>>~%EOE% != 0 -%cat: unable to print '.+[/\\]test[/\\]cat[/\\]non-existent[/\\]in': .+% +%cat: unable to print '.+[/\\]test[/\\]cat[/\\]non-existent[/\\]test[/\\]1[/\\]in': .+% %%? EOE +EOI +$b : empty-path : : Cat an empty path. : +$c <<EOI; cat '' 2>"cat: invalid path ''" == 1 +EOI +$b # @@ When piping is ready test cat on a big file to test it is asynchronous. # |