mirror of
https://github.com/opnsense/src.git
synced 2026-02-13 15:57:05 -05:00
case1.0 tests POSIX requirements and one more for keywords in case statements. The others test very special cases of command substitution. These also work on stable/8.
32 lines
342 B
Text
32 lines
342 B
Text
# $FreeBSD$
|
|
|
|
# Pretty much only ash derivatives can parse all of this.
|
|
|
|
f1() {
|
|
x=$(case x in
|
|
(x|esac) ;;
|
|
(*) echo bad >&2 ;;
|
|
esac)
|
|
}
|
|
f1
|
|
f2() {
|
|
x=$(case x in
|
|
(x|esac) ;;
|
|
(*) echo bad >&2
|
|
esac)
|
|
}
|
|
f2
|
|
f3() {
|
|
x=$(case x in
|
|
x|esac) ;;
|
|
*) echo bad >&2 ;;
|
|
esac)
|
|
}
|
|
f3
|
|
f4() {
|
|
x=$(case x in
|
|
x|esac) ;;
|
|
*) echo bad >&2
|
|
esac)
|
|
}
|
|
f4
|