svn commit: r211405 - head/tools/regression/bin/sh/parser

Jilles Tjoelker jilles at FreeBSD.org
Mon Aug 16 21:14:50 UTC 2010


Author: jilles
Date: Mon Aug 16 21:14:49 2010
New Revision: 211405
URL: http://svn.freebsd.org/changeset/base/211405

Log:
  sh: Split off a more dubious test from parser/heredoc2.0.

Added:
  head/tools/regression/bin/sh/parser/heredoc8.0   (contents, props changed)
Modified:
  head/tools/regression/bin/sh/parser/heredoc2.0

Modified: head/tools/regression/bin/sh/parser/heredoc2.0
==============================================================================
--- head/tools/regression/bin/sh/parser/heredoc2.0	Mon Aug 16 21:12:26 2010	(r211404)
+++ head/tools/regression/bin/sh/parser/heredoc2.0	Mon Aug 16 21:14:49 2010	(r211405)
@@ -17,11 +17,6 @@ EOF
 )" = "ast*que?non"'
 
 check '"$(cat <<EOF
-${s+"x"}
-EOF
-)" = ${dq}x${dq}'
-
-check '"$(cat <<EOF
 ${s+'$sq'x'$sq'}
 EOF
 )" = ${sq}x${sq}'

Added: head/tools/regression/bin/sh/parser/heredoc8.0
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/regression/bin/sh/parser/heredoc8.0	Mon Aug 16 21:14:49 2010	(r211405)
@@ -0,0 +1,20 @@
+# $FreeBSD$
+
+failures=0
+
+check() {
+	if ! eval "[ $* ]"; then
+		echo "Failed: $*"
+		: $((failures += 1))
+	fi
+}
+
+s='ast*que?non' sq=\' dq=\"
+
+# This is possibly useful but differs from other shells.
+check '"$(cat <<EOF
+${s+"x"}
+EOF
+)" = ${dq}x${dq}'
+
+exit $((failures != 0))


More information about the svn-src-all mailing list