sh: Add some tests for omitting whitespace.
authorPeter Avalos <pavalos@dragonflybsd.org>
Sat, 16 Apr 2011 21:36:09 +0000 (11:36 -1000)
committerPeter Avalos <pavalos@dragonflybsd.org>
Sat, 16 Apr 2011 21:55:49 +0000 (11:55 -1000)
Obtained-from: FreeBSD

tools/regression/bin/sh/parser/no-space1.0 [new file with mode: 0644]
tools/regression/bin/sh/parser/no-space2.0 [new file with mode: 0644]

diff --git a/tools/regression/bin/sh/parser/no-space1.0 b/tools/regression/bin/sh/parser/no-space1.0
new file mode 100644 (file)
index 0000000..b073b10
--- /dev/null
@@ -0,0 +1,18 @@
+# $FreeBSD: src/tools/regression/bin/sh/parser/no-space1.0,v 1.1 2011/02/20 17:28:58 jilles Exp $
+
+# These are ugly but are required to work.
+
+set -e
+
+while(false)do(:)done
+if(false)then(:)fi
+if(false)then(:)else(:)fi
+(:&&:)||:
+until(:)do(:)done
+case x in(x);;*)exit 1;(:)esac
+case x in(x);;*)exit 1;;esac
+for i do(:)done
+{(:)}
+f(){(:)}
+:|:
+(:)|(:)
diff --git a/tools/regression/bin/sh/parser/no-space2.0 b/tools/regression/bin/sh/parser/no-space2.0
new file mode 100644 (file)
index 0000000..e637a68
--- /dev/null
@@ -0,0 +1,7 @@
+# $FreeBSD: src/tools/regression/bin/sh/parser/no-space2.0,v 1.1 2011/02/20 17:28:58 jilles Exp $
+
+# This conflicts with ksh extended patterns but occurs in the wild.
+
+set -e
+
+!(false)