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/rm.test | 33 +++++++++++---------------------- 1 file changed, 11 insertions(+), 22 deletions(-) (limited to 'tests/test/script/builtin/rm.test') diff --git a/tests/test/script/builtin/rm.test b/tests/test/script/builtin/rm.test index 937633b..9a9ffc6 100644 --- a/tests/test/script/builtin/rm.test +++ b/tests/test/script/builtin/rm.test @@ -11,15 +11,13 @@ : : Removing with no arguments fails. : - $c <'rm 2>"rm: missing file" == 1'; - $b + $c <'rm 2>"rm: missing file" == 1' && $b : force : : Removing with no arguments succeeds with -f option. : - $c <'rm -f'; - $b + $c <'rm -f' && $b } : file @@ -29,11 +27,10 @@ : : Removing existing file succeeds. : - $c <>/~%EOE% == 1 %rm: unable to remove '.+/file/not-exists/fail/test/1/a': .+% EOE EOI - $b : force : : Removing non-existing file succeeds with -f option. : - $c <'rm -f a'; - $b + $c <'rm -f a' && $b } } @@ -65,30 +60,27 @@ : : Removing directory fails by default. : - $c <"rm: '$normalize([path] $~/a)' is a directory" == 1 EOI - $b : recursive : : Removing directory succeeds with -r option. : - $c <"rm: '([string] $~)' contains test working directory '$~'" == 1 EOI - $b } : path @@ -98,10 +90,9 @@ : : Removing an empty path fails. : - $c <"rm: invalid path ''" == 1 EOI - $b : outside-scope : @@ -112,19 +103,17 @@ : : Removing path outside the testscript working directory fails. : - $c <>/~%EOE% == 1 %rm: '.+/path/outside-scope/fail/a/b/c' is out of working directory '.+/path/outside-scope/fail/test'% EOE EOI - $b : force : : Removing path outside the testscript working directory succeeds with -f : option. : - $c <'rm -f ../../a/b/c'; - $b + $c <'rm -f ../../a/b/c' && $b } } -- cgit v1.1