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/0d259c880be6
branches:  trunk
changeset: 936102:0d259c880be6
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 1dc27ed250fc -r 0d259c880be6 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 1dc27ed250fc -r 0d259c880be6 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