freebsd-dev/tools/regression/bin/sh/builtins/case1.0
Stefan Farfeleder aafd6a87a6 The exit status of a case statement where none of the patterns is matched
is supposed to be 0, not the status of the previous command.

Reported by:	Eygene Ryabinkin
PR:		116559
Approved by:	re (gnn)
2007-10-04 16:14:48 +00:00

14 lines
123 B
Plaintext

#$FreeBSD$
f()
{
false
case $1 in
foo) true ;;
bar) false ;;
esac
}
f foo || exit 1
f bar && exit 1
f quux || exit 1