Home | History | Annotate | Line # | Download | only in unit-tests
varmod-match-escape.mk revision 1.3
      1  1.3  rillig # $NetBSD: varmod-match-escape.mk,v 1.3 2020/11/01 19:02:22 rillig Exp $
      2  1.1  rillig #
      3  1.1  rillig # As of 2020-08-01, the :M and :N modifiers interpret backslashes differently,
      4  1.1  rillig # depending on whether there was a variable expression somewhere before the
      5  1.1  rillig # first backslash or not.  See ApplyModifier_Match, "copy = TRUE".
      6  1.1  rillig #
      7  1.1  rillig # Apart from the different and possibly confusing debug output, there is no
      8  1.1  rillig # difference in behavior.  When parsing the modifier text, only \{, \} and \:
      9  1.1  rillig # are unescaped, and in the pattern matching these have the same meaning as
     10  1.1  rillig # their plain variants '{', '}' and ':'.  In the pattern matching from
     11  1.1  rillig # Str_Match, only \*, \? or \[ would make a noticeable difference.
     12  1.1  rillig SPECIALS=	\: : \\ * \*
     13  1.3  rillig .MAKEFLAGS: -dv
     14  1.1  rillig .if ${SPECIALS:M${:U}\:} != ${SPECIALS:M\:${:U}}
     15  1.2  rillig .  warning unexpected
     16  1.1  rillig .endif
     17  1.3  rillig .MAKEFLAGS: -d0
     18  1.1  rillig 
     19  1.1  rillig all:
     20  1.1  rillig 	@:;
     21