Add test to handle unknown arguments gracfully
This commit is contained in:
parent
bead42f953
commit
8b71762532
1 changed files with 7 additions and 0 deletions
7
test.sh
7
test.sh
|
@ -58,6 +58,13 @@ EOF
|
|||
./skip 2 test.in --token dolor > test.out
|
||||
diff --brief test.expect test.out
|
||||
|
||||
echo "> handle unknown parameter with simple error message"
|
||||
cat<<EOF > test.expect
|
||||
Invalid argument '--foo'
|
||||
EOF
|
||||
./skip --foo > test.out 2>&1 || ## error is expected
|
||||
diff --brief test.expect test.out
|
||||
|
||||
rm test.in test.out test.expect
|
||||
|
||||
echo done
|
||||
|
|
Loading…
Reference in a new issue