aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGavin Howard <gavin@yzena.com>2021-07-11 20:12:47 -0600
committerGavin Howard <gavin@yzena.com>2021-07-11 20:12:47 -0600
commit25c3bb52562a61dda7430203b15c989d12651ca2 (patch)
tree40310fb10d8a64b12e47f3eeae3789a91d9f983e /tests
parent9b038e3cd9a92aa7b2c30cf078e25f4c30870bf2 (diff)
downloadplatform_external_bc-25c3bb52562a61dda7430203b15c989d12651ca2.tar.gz
platform_external_bc-25c3bb52562a61dda7430203b15c989d12651ca2.tar.bz2
platform_external_bc-25c3bb52562a61dda7430203b15c989d12651ca2.zip
Add a test to hit some branches in command-line arg parsing
Signed-off-by: Gavin Howard <gavin@yzena.com>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/other.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/other.sh b/tests/other.sh
index f270c002..28126c3d 100755
--- a/tests/other.sh
+++ b/tests/other.sh
@@ -258,6 +258,16 @@ err="$?"
checkerrtest "$d" "$err" "given argument to long option with no argument" "$out2" "$d"
+"$exe" "$@" -: > /dev/null 2> "$out2"
+err="$?"
+
+checkerrtest "$d" "$err" "colon short option" "$out2" "$d"
+
+"$exe" "$@" --: > /dev/null 2> "$out2"
+err="$?"
+
+checkerrtest "$d" "$err" "colon long option" "$out2" "$d"
+
printf 'pass\n'
printf 'Running %s directory test...' "$d"