Rico pointed out that the testsuite failed on his system (dash
represented /bin/sh). Turns out that 'shift' in dash exits shell
with exit status 2 when there are no items in the array.
The other issue was that 'test-option-parser.sh' did not
re-executed the test in proper shell, but in /bin/sh.
* gl/tests/test-option-parser-helper (test_parse_eat_test): Don't
shift for empty $@.
* gl/tests/test-option-parser.sh: Use $__GL_ALL_SHELLS_SHELL as
shell which runs the helper.
Pádraig Brady P@draigBrady.com
Richard B. Kreckel kreckel@ginac.de
Richard Purdie rpurdie@rpsys.net
+Rico Tzschichholz ricotz@ubuntu.com
Robert Garron Robert.Garron@Access3000.net
Robert Ögren lists@roboros.com
Robert Yang liezhi.yang@windriver.com
_G_opt=$1 ; shift
case $_G_opt in
--test|-t)
- test $# = 0 && func_missing_arg $_G_opt
_t_parse_match=:
- opt_test=$1
- shift
+ if test $# = 0; then
+ func_missing_arg $_G_opt
+ else
+ opt_test=$1
+ shift
+ fi
;;
esac
. "$abs_aux_dir"/options-parser || exit 1
-helper=$abs_srcdir/test-option-parser-helper
+helper="$__GL_ALL_SHELLS_SHELL $abs_srcdir/test-option-parser-helper"
check_output_inner ()
{