diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2017-01-30 23:31:45 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2017-01-31 15:54:40 +0300 |
commit | 7cf026b8989a71a0d0e775e21e697ba9f1bee987 (patch) | |
tree | 9d7b78c91d1dae66bf2faabba7aa9acc11a17f6d /tests/test/script/builtin/test.test | |
parent | 749f748ae6ded6e229214d2dddf3c45482bffbd3 (diff) |
Move builtin and runner tests to '$c ... && $b' pattern
Diffstat (limited to 'tests/test/script/builtin/test.test')
-rw-r--r-- | tests/test/script/builtin/test.test | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/tests/test/script/builtin/test.test b/tests/test/script/builtin/test.test index 7e9ace4..2e792ad 100644 --- a/tests/test/script/builtin/test.test +++ b/tests/test/script/builtin/test.test @@ -9,21 +9,18 @@ { : exists : - $c <<EOI; + $c <<EOI && $b touch a; test -f a EOI - $b : not-exists : - $c <'test -f a == 1'; - $b + $c <'test -f a == 1' && $b : not-file : - $c <'test -f . == 1'; - $b + $c <'test -f . == 1' && $b } : dir @@ -31,49 +28,42 @@ { : exists : - $c <'test -d .'; - $b + $c <'test -d .' && $b : not-exists : - $c <'test -d a == 1'; - $b + $c <'test -d a == 1' && $b : not-dir : - $c <<EOI; + $c <<EOI && $b touch a; test -d a == 1 EOI - $b } : no-args : : Test passing no arguments. : -$c <'test 2>"test: missing path" == 2'; -$b +$c <'test 2>"test: missing path" == 2' && $b : invalid-option : : Test passing invalid option. : -$c <'test -c a 2>"test: invalid option" == 2'; -$b +$c <'test -c a 2>"test: invalid option" == 2' && $b : unexpected-arg : : Test passing extra argument. : -$c <'test -f a b 2>"test: unexpected argument" == 2'; -$b +$c <'test -f a b 2>"test: unexpected argument" == 2' && $b : empty-path : : Test testing an empty path. : -$c <<EOI; +$c <<EOI && $b test -d '' 2>"test: invalid path ''" == 2 EOI -$b |