13 for CMD in $CMDLINE_OPTS ; do
16 # check if CMD is optional
17 if [[ $CMD == *:: ]] ; then
20 # CMD expects addional parameter
21 if [[ $CMD == *: ]] ; then
24 VALUES[$count]="${CMD%%:*}$DELIM$PARAM"
29 # build the commandline
30 while [ "$i" -lt "$count" ] ; do
31 CMDLINE+="--${VALUES[$i]} "
35 . ../cmdlineopts.clp $CMDLINE
39 # check the result against input
40 while [ "$i" -lt "$count" ] ; do
46 VARNAME='$_opt_'${VARNAME/-/_}
47 VALUE="$(eval echo $VARNAME)"
48 if [ -z "$RESULT" ] ; then
49 assertNotNull "$VARNAME should be not null" "$VALUE"
51 assertEquals "$VARNAME" "$RESULT" "$VALUE"
58 . /usr/share/shunit2/shunit2