From b917233d4b618d587f569706d8d528b051efdba4 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sat, 31 Dec 2016 03:14:50 +0300 Subject: Tests cleanup --- tests/test/script/builtin/cat.test | 40 ++++++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 12 deletions(-) (limited to 'tests/test/script/builtin/cat.test') 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 <>EOO +$c <>EOO foo bar -EOI +EOF foo bar EOO +EOI +$b : dash : -cat - <>EOO +$c <>EOO foo bar -EOI +EOF foo bar EOO +EOI +$b : file : -cat <>>out; +$c <>>out; foo bar -EOI +EOF cat out >>EOO foo bar EOO +EOI +$b : in-repeat : -cat - <>EOO +$c <>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 <>~%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 <"cat: invalid path ''" == 1 +EOI +$b # @@ When piping is ready test cat on a big file to test it is asynchronous. # -- cgit v1.1