From 8b7176253231169889efa52c3417bc0ffd26ff1b Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Fri, 14 Jan 2022 07:05:09 +0000 Subject: [PATCH] Add test to handle unknown arguments gracfully --- test.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test.sh b/test.sh index 769152f..8f8b547 100755 --- a/test.sh +++ b/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< 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