diff options
Diffstat (limited to 'testsuite/dwz.tests/illegal-option.sh')
-rw-r--r-- | testsuite/dwz.tests/illegal-option.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/testsuite/dwz.tests/illegal-option.sh b/testsuite/dwz.tests/illegal-option.sh new file mode 100644 index 0000000..f767f4c --- /dev/null +++ b/testsuite/dwz.tests/illegal-option.sh @@ -0,0 +1,25 @@ +cp $execs/hello 1 + +if dwz -x 1 2> dwz.err; status=$?; then + true +fi + +[ $status -eq 1 ] + +grep -q ": invalid option -- 'x'" dwz.err +grep -q "Usage:" dwz.err + +cmp 1 $execs/hello + +if dwz --x 1 2> dwz.err; status=$?; then + true +fi + +[ $status -eq 1 ] + +grep -q ": unrecognized option '--x'" dwz.err +grep -q "Usage:" dwz.err + +cmp 1 $execs/hello + +rm -f 1 dwz.err |