From 32d97fbd4760045b18c700094886c623da9a5924 Mon Sep 17 00:00:00 2001 From: "kate.ward" Date: Sun, 6 Jan 2013 16:05:26 +0000 Subject: fixed testComplicatedCommandLineStandard() test --- source/1.0/src/shflags_test_parsing.sh | 7 +++++-- 1 file 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() -- cgit v1.2.3