1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
#!/bin/sh
# vim: set filetype=sh :
# file: test.ia-empty
# copyright: Bernd Schumacher <bernd.schumacher@hpe.com> (2007-2020)
# license: GNU General Public License, version 3
# description: test handling ia options -c -s -m
# see also: example.ia-empty
# The following tests are included:
# Next tests use example.ia-empty
# (1) Switch to interactive, choose next command and use default until end
. ./tstlib
# bash "e:./ia.run: line 71: nonexisting-command: command not found"
# dash "e:./example.ia-c-s-m: 1: eval: nonexisting-command: not found"
UNIFY_command_not_found="sed -e \"s/e:.*nonexisting-command:.*not found.*/e:nonexisting-command: not found/\""
shell=""
while [ $# -ne 0 ]; do
if [ "$1" = "-s" ]; then
shell="$2"
shift 2
else
echo "ERROR $0: unknown option <$1>" >&2
exit 1
fi
done
[ "$shell" ] && set -- "$@" -s "$shell"
cmd=$(dirname $0)/example.ia-empty
bug913718_cmd
rm -f $ia_logfile
check "(1) run without options" "$@" "$cmd" ""
|