summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--regress/make-quoting/Makefile6
-rw-r--r--regress/make-quoting/files/newline.mk11
-rw-r--r--regress/make-quoting/files/newline.out1
-rw-r--r--regress/make-quoting/files/quoting.mk5
4 files changed, 19 insertions, 4 deletions
diff --git a/regress/make-quoting/Makefile b/regress/make-quoting/Makefile
index e7c2c588c46..3580e846b4c 100644
--- a/regress/make-quoting/Makefile
+++ b/regress/make-quoting/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2006/05/11 23:10:50 rillig Exp $
+# $NetBSD: Makefile,v 1.6 2006/06/29 13:35:18 rillig Exp $
#
DISTNAME= regress-make-1.0
@@ -8,8 +8,8 @@ DISTFILES= # empty
MAINTAINER= rillig@NetBSD.org
COMMENT= Test Makefile quoting and make(1) bugs
-REGRESS_TESTS= continue dblquote for ltarget nestfor quoting sglquote \
- vtarget bug1 bug2
+REGRESS_TESTS= bug1 bug2 continue dblquote for ltarget nestfor newline
+REGRESS_TESTS+= quoting sglquote vtarget
WRKSRC= ${WRKDIR}
diff --git a/regress/make-quoting/files/newline.mk b/regress/make-quoting/files/newline.mk
new file mode 100644
index 00000000000..ff8ab8291b3
--- /dev/null
+++ b/regress/make-quoting/files/newline.mk
@@ -0,0 +1,11 @@
+# $NetBSD: newline.mk,v 1.1 2006/06/29 13:35:18 rillig Exp $
+#
+# This file documents a bug in the :Q operator, which does not handle
+# the newline character correctly. It produces <backslash><newline>
+# instead of the proper <quote><newline><quote>.
+#
+
+S= foo ${.newline} bar
+
+all:
+ printf "%s\\n" ${S:Q}
diff --git a/regress/make-quoting/files/newline.out b/regress/make-quoting/files/newline.out
new file mode 100644
index 00000000000..e431ed1cd2a
--- /dev/null
+++ b/regress/make-quoting/files/newline.out
@@ -0,0 +1 @@
+foo bar
diff --git a/regress/make-quoting/files/quoting.mk b/regress/make-quoting/files/quoting.mk
index 170aa8e0977..dd90e73c2a8 100644
--- a/regress/make-quoting/files/quoting.mk
+++ b/regress/make-quoting/files/quoting.mk
@@ -1,8 +1,11 @@
-# $NetBSD: quoting.mk,v 1.1.1.1 2005/05/15 21:10:16 rillig Exp $
+# $NetBSD: quoting.mk,v 1.2 2006/06/29 13:35:18 rillig Exp $
#
# This file demonstrates various techniques for quoting variables when
# passing them to the shell.
#
+# The third line revealed a bug in the NetBSD 3.0 shell, which discards
+# the last argument under some circumstances when it is empty.
+#
EVIL_STRING?= " "