svn commit: r273243 - head/bin/sh/tests/parser

Jilles Tjoelker jilles at FreeBSD.org
Fri Oct 17 21:52:59 UTC 2014


Author: jilles
Date: Fri Oct 17 21:52:57 2014
New Revision: 273243
URL: https://svnweb.freebsd.org/changeset/base/273243

Log:
  sh: Add some tests for backslash-newline continuation.

Added:
  head/bin/sh/tests/parser/line-cont1.0   (contents, props changed)
  head/bin/sh/tests/parser/line-cont2.0   (contents, props changed)
  head/bin/sh/tests/parser/line-cont3.0   (contents, props changed)
Modified:
  head/bin/sh/tests/parser/Makefile

Modified: head/bin/sh/tests/parser/Makefile
==============================================================================
--- head/bin/sh/tests/parser/Makefile	Fri Oct 17 21:09:03 2014	(r273242)
+++ head/bin/sh/tests/parser/Makefile	Fri Oct 17 21:52:57 2014	(r273243)
@@ -55,6 +55,9 @@ FILES+=		heredoc9.0
 FILES+=		heredoc10.0
 FILES+=		heredoc11.0
 FILES+=		heredoc12.0
+FILES+=		line-cont1.0
+FILES+=		line-cont2.0
+FILES+=		line-cont3.0
 FILES+=		no-space1.0
 FILES+=		no-space2.0
 FILES+=		only-redir1.0

Added: head/bin/sh/tests/parser/line-cont1.0
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/bin/sh/tests/parser/line-cont1.0	Fri Oct 17 21:52:57 2014	(r273243)
@@ -0,0 +1,16 @@
+# $FreeBSD$
+
+i\
+f
+t\
+r\
+u\
+e
+t\
+h\
+e\
+n
+:
+\
+f\
+i

Added: head/bin/sh/tests/parser/line-cont2.0
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/bin/sh/tests/parser/line-cont2.0	Fri Oct 17 21:52:57 2014	(r273243)
@@ -0,0 +1,4 @@
+# $FreeBSD$
+
+[ "a\
+b" = ab ]

Added: head/bin/sh/tests/parser/line-cont3.0
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/bin/sh/tests/parser/line-cont3.0	Fri Oct 17 21:52:57 2014	(r273243)
@@ -0,0 +1,7 @@
+# $FreeBSD$
+
+v=`printf %s 'a\
+b'`
+w="`printf %s 'c\
+d'`"
+[ "$v$w" = abcd ]


More information about the svn-src-head mailing list