aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkate.ward <kate.ward@forestent.com>2013-01-06 16:05:26 +0000
committerkate.ward <kate.ward@forestent.com>2013-01-06 16:05:26 +0000
commit32d97fbd4760045b18c700094886c623da9a5924 (patch)
tree69a537b6c2ea54347cd804ce7c75607b3ba06323
parent20d9ef5a66aed463e45507af21720958e9f29a89 (diff)
downloadshflags-32d97fbd4760045b18c700094886c623da9a5924.tar.gz
fixed testComplicatedCommandLineStandard() test
-rwxr-xr-xsource/1.0/src/shflags_test_parsing.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/1.0/src/shflags_test_parsing.sh b/source/1.0/src/shflags_test_parsing.sh
index c52ce71..c8a07bd 100755
--- a/source/1.0/src/shflags_test_parsing.sh
+++ b/source/1.0/src/shflags_test_parsing.sh
@@ -284,7 +284,10 @@ testFlagsWithEquals()
testComplicatedCommandLineStandard()
{
- # note: standard getopt stops parsing after first non-flag argument :-(
+ flags_getoptIsEnh && return
+
+ # Note: standard getopt stops parsing after first non-flag argument, which
+ # results in the remaining flags being treated as arguments instead.
FLAGS -i 1 non_flag_1 -s 'two' non_flag_2 -f 3 non_flag_3 \
>"${stdoutF}" 2>"${stderrF}"
rtrn=$?
@@ -295,7 +298,7 @@ testComplicatedCommandLineStandard()
th_showOutput ${rtrn} "${stdoutF}" "${stderrF}"
eval set -- "${FLAGS_ARGV}"
- assertEquals 'incorrect number of argv values' 3 $#
+ assertEquals 'incorrect number of argv values' 7 $#
}
testComplicatedCommandLineEnhanced()