diff options
Diffstat (limited to 'tests/test/script/builtin/test.testscript')
-rw-r--r-- | tests/test/script/builtin/test.testscript | 85 |
1 files changed, 0 insertions, 85 deletions
diff --git a/tests/test/script/builtin/test.testscript b/tests/test/script/builtin/test.testscript deleted file mode 100644 index 9fde142..0000000 --- a/tests/test/script/builtin/test.testscript +++ /dev/null @@ -1,85 +0,0 @@ -# file : tests/test/script/builtin/test.testscript -# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd -# license : MIT; see accompanying LICENSE file - -.include ../common.testscript - -: file -: -{ - : exists - : - $c <<EOI && $b - touch a; - test -f a - EOI - - : not-exists - : - $c <'test -f a == 1' && $b - - : not-file - : - $c <'test -f . == 1' && $b -} - -: dir -: -{ - : exists - : - $c <'test -d .' && $b - - : not-exists - : - $c <'test -d a == 1' && $b - - : not-dir - : - $c <<EOI && $b - touch a; - test -d a == 1 - EOI -} - -: options -: -{ - : unknown - : - $c <<EOI && $b - test -u 2>"test: unknown option '-u'" == 2 - EOI - - : none - : - $c <<EOI && $b - test 2>"test: either -f|--file or -d|--directory must be specified" == 2 - EOI - - : both-file-dir - : - $c <<EOI && $b - test -fd 2>"test: both -f|--file and -d|--directory specified" == 2 - EOI -} - -: args -: -{ - : none - : - $c <'test -f 2>"test: missing path" == 2' && $b - - : unexpected - : - $c <<EOI && $b - test -f a b 2>"test: unexpected argument 'b'" == 2 - EOI - - : empty-path - : - $c <<EOI && $b - test -d '' 2>"test: invalid path ''" == 2 - EOI -} |