make(1): add more tests for :ts modifier

This commit is contained in:
rillig 2020-07-19 09:13:22 +00:00
parent 5a22ba8ebf
commit 0376ea853f
2 changed files with 8 additions and 4 deletions

View File

@ -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

View File

@ -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}