opnsense-src/tools/regression/bin/sh/parser/case2.0
Jilles Tjoelker f5fa4d2e65 MFC r206143,r206148,r206149,r206167,r206491,r206817,r207127,r207824
Various testcases that work correctly with stable/8 sh.
2010-05-13 17:22:00 +00:00

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