Module Name: src
Committed By: rillig
Date: Sun Jul 19 09:13:22 UTC 2020
Modified Files:
src/usr.bin/make/unit-tests: modts.exp modts.mk
Log Message:
make(1): add more tests for :ts modifier
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/modts.exp \
src/usr.bin/make/unit-tests/modts.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/make/unit-tests/modts.exp
diff -u src/usr.bin/make/unit-tests/modts.exp:1.3 src/usr.bin/make/unit-tests/modts.exp:1.4
--- src/usr.bin/make/unit-tests/modts.exp:1.3 Sun Jul 19 07:08:09 2020
+++ src/usr.bin/make/unit-tests/modts.exp Sun Jul 19 09:13:22 2020
@@ -39,6 +39,7 @@ B.${AAA:ts}="Baaa" == Baaa?
:ts :S => aaxBbxaaxbbxaaxbb
:ts :S space => axa a axc
:ts :S space :M => axaxaxaxc
-:ts :S => axa a axc
-:ts :S :@ => axa a axc
+:ts :S => axa a axc
+:ts :S :@ => axa a axc
+:ts :S :@ :M => axaxaxaxc
exit status 0
Index: src/usr.bin/make/unit-tests/modts.mk
diff -u src/usr.bin/make/unit-tests/modts.mk:1.3 src/usr.bin/make/unit-tests/modts.mk:1.4
--- src/usr.bin/make/unit-tests/modts.mk:1.3 Sun Jul 19 07:08:09 2020
+++ src/usr.bin/make/unit-tests/modts.mk Sun Jul 19 09:13:22 2020
@@ -56,5 +56,8 @@ mod-ts-space:
# Not all modifiers behave this way though. Some of them always use
# a space as word separator instead of the :ts separator.
# This seems like an oversight during implementation.
- @${PRINT} ':ts :S => '${a ababa c:L:tsx:S,b, ,g:Q}
- @${PRINT} ':ts :S :@ => '${a ababa c:L:tsx:S,b, ,g:@v@${v}@:Q}
+ @${PRINT} ':ts :S => '${a ababa c:L:tsx:S,b, ,g:Q}
+ @${PRINT} ':ts :S :@ => '${a ababa c:L:tsx:S,b, ,g:@v@${v}@:Q}
+
+ # A final :M* modifier applies the :ts separator again, though.
+ @${PRINT} ':ts :S :@ :M => '${a ababa c:L:tsx:S,b, ,g:@v@${v}@:M*:Q}