From 7cf026b8989a71a0d0e775e21e697ba9f1bee987 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 30 Jan 2017 23:31:45 +0300 Subject: Move builtin and runner tests to '$c ... && $b' pattern --- tests/test/script/builtin/cat.test | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 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 442ef00..33515bc 100644 --- a/tests/test/script/builtin/cat.test +++ b/tests/test/script/builtin/cat.test @@ -6,7 +6,7 @@ : in : -$c <>EOO foo bar @@ -15,11 +15,10 @@ foo bar EOO EOI -$b : dash : -$c <>EOO foo bar @@ -28,11 +27,10 @@ foo bar EOO EOI -$b : file : -$c <=out; foo bar @@ -42,11 +40,10 @@ foo bar EOO EOI -$b : in-repeat : -$c <>EOO foo bar @@ -55,25 +52,31 @@ foo bar EOO EOI -$b : non-existent : -$c <>/~%EOE% != 0 %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. -# +: big +: +: Cat a big file (about 3MB) to test that the builtin is asynchronous. +: +{ + s="------------------------------------------------------------------------" + s="$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s" + s="$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s" + s="$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s" + $c <"cat <'$s' | cat >'$s'" && $b +} -- cgit v1.1