diff options
author | jilles <jilles@FreeBSD.org> | 2011-02-20 17:28:58 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2011-02-20 17:28:58 +0000 |
commit | 9a5bced8a38585dae7e80603f1854b577eba2735 (patch) | |
tree | ca5e725256c1d1b2bfbc6f3249f757554d2b9e47 | |
parent | ab81f5f28fa28097efa0eb846db7f46ab91abc97 (diff) | |
download | FreeBSD-src-9a5bced8a38585dae7e80603f1854b577eba2735.zip FreeBSD-src-9a5bced8a38585dae7e80603f1854b577eba2735.tar.gz |
sh: Add some tests for omitting whitespace whereever possible.
-rw-r--r-- | tools/regression/bin/sh/parser/no-space1.0 | 18 | ||||
-rw-r--r-- | tools/regression/bin/sh/parser/no-space2.0 | 7 |
2 files changed, 25 insertions, 0 deletions
diff --git a/tools/regression/bin/sh/parser/no-space1.0 b/tools/regression/bin/sh/parser/no-space1.0 new file mode 100644 index 0000000..6df9f63 --- /dev/null +++ b/tools/regression/bin/sh/parser/no-space1.0 @@ -0,0 +1,18 @@ +# $FreeBSD$ + +# 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 index 0000000..4e8447b --- /dev/null +++ b/tools/regression/bin/sh/parser/no-space2.0 @@ -0,0 +1,7 @@ +# $FreeBSD$ + +# This conflicts with ksh extended patterns but occurs in the wild. + +set -e + +!(false) |