Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make/unit-tests Fix unit test for edge case in :M mo...



details:   https://anonhg.NetBSD.org/src/rev/ec08c6aa5b02
branches:  trunk
changeset: 461560:ec08c6aa5b02
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Nov 30 02:55:47 2019 +0000

description:
Fix unit test for edge case in :M modifier

diffstat:

 usr.bin/make/unit-tests/varmod-edge.mk |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (25 lines):

diff -r 16b23c36334a -r ec08c6aa5b02 usr.bin/make/unit-tests/varmod-edge.mk
--- a/usr.bin/make/unit-tests/varmod-edge.mk    Sat Nov 30 02:47:14 2019 +0000
+++ b/usr.bin/make/unit-tests/varmod-edge.mk    Sat Nov 30 02:55:47 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: varmod-edge.mk,v 1.2 2019/11/30 02:31:19 rillig Exp $
+# $NetBSD: varmod-edge.mk,v 1.3 2019/11/30 02:55:47 rillig Exp $
 #
 # Tests for edge cases in variable modifiers.
 #
@@ -68,11 +68,13 @@
 # If the first backslash were to escape the second backslash, the first
 # closing brace would match the opening parenthesis (see M-mixed), and
 # the second closing brace would be needed to close the variable.
+# After that, the remaining backslash would escape the parenthesis in
+# the pattern, therefore (} would match.
 TESTS+=                M-bsbs
-INP.M-bsbs=    \( \(}
+INP.M-bsbs=    (} \( \(}
 MOD.M-bsbs=    ${INP.M-bsbs:M\\(}}
 EXP.M-bsbs=    \(}
-#EXP.M-bsbs=   \(      # If the first backslash were to escape ...
+#EXP.M-bsbs=   (}      # If the first backslash were to escape ...
 
 all:
 .for test in ${TESTS}



Home | Main Index | Thread Index | Old Index