opnsense-src/tools/regression/bin/sh/builtins/dot3.0
Jilles Tjoelker 7b8b6c9c46 sh: Test that . /dev/null returns exit status 0 and does not preserve $?.
Preserving $? may cause problems particularly if set -e is in effect.

It may be useful to preserve the old value of $? in the dot script but this
must not be implemented in such a way that it would break this test.
2011-03-07 23:52:23 +00:00

10 lines
115 B
Text

# $FreeBSD$
# . should return 0 if no command was executed.
if false; then
exit 3
else
. /dev/null
exit $?
fi