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 make(1): add more tests for :ts modi...
details: https://anonhg.NetBSD.org/src/rev/748ecb87feff
branches: trunk
changeset: 973950:748ecb87feff
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Jul 19 09:13:22 2020 +0000
description:
make(1): add more tests for :ts modifier
diffstat:
usr.bin/make/unit-tests/modts.exp | 5 +++--
usr.bin/make/unit-tests/modts.mk | 7 +++++--
2 files changed, 8 insertions(+), 4 deletions(-)
diffs (27 lines):
diff -r a3c0d3f085a0 -r 748ecb87feff usr.bin/make/unit-tests/modts.exp
--- a/usr.bin/make/unit-tests/modts.exp Sun Jul 19 08:58:35 2020 +0000
+++ b/usr.bin/make/unit-tests/modts.exp Sun Jul 19 09:13:22 2020 +0000
@@ -39,6 +39,7 @@
: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
diff -r a3c0d3f085a0 -r 748ecb87feff usr.bin/make/unit-tests/modts.mk
--- a/usr.bin/make/unit-tests/modts.mk Sun Jul 19 08:58:35 2020 +0000
+++ b/usr.bin/make/unit-tests/modts.mk Sun Jul 19 09:13:22 2020 +0000
@@ -56,5 +56,8 @@
# 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}
Home |
Main Index |
Thread Index |
Old Index