sh: Test that '!' is literal if quoted and first char of bracket expr
authorPeter Avalos <pavalos@dragonflybsd.org>
Sun, 25 Dec 2011 17:33:08 +0000 (09:33 -0800)
committerPeter Avalos <pavalos@dragonflybsd.org>
Sun, 25 Dec 2011 17:33:08 +0000 (09:33 -0800)
Obtained-from:  FreeBSD 223546

tools/regression/bin/sh/builtins/case10.0 [new file with mode: 0644]

diff --git a/tools/regression/bin/sh/builtins/case10.0 b/tools/regression/bin/sh/builtins/case10.0
new file mode 100644 (file)
index 0000000..9883ce5
--- /dev/null
@@ -0,0 +1,16 @@
+# $FreeBSD: src/tools/regression/bin/sh/builtins/case10.0,v 1.1 2011/06/25 20:37:43 jilles Exp $
+
+case ! in
+[\!!]) ;;
+*) echo Failed at $LINENO ;;
+esac
+
+case ! in
+['!'!]) ;;
+*) echo Failed at $LINENO ;;
+esac
+
+case ! in
+["!"!]) ;;
+*) echo Failed at $LINENO ;;
+esac