summary refs log tree commit diff
path: root/bin/1sh/tests/parser/case2.0
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--bin/1sh/tests/parser/case2.032
1 files changed, 32 insertions, 0 deletions
diff --git a/bin/1sh/tests/parser/case2.0 b/bin/1sh/tests/parser/case2.0
new file mode 100644
index 00000000..539ed0fe
--- /dev/null
+++ b/bin/1sh/tests/parser/case2.0
@@ -0,0 +1,32 @@
+# $FreeBSD: releng/12.1/bin/sh/tests/parser/case2.0 207824 2010-05-09 17:10:50Z jilles $
+
+# 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