aboutsummaryrefslogtreecommitdiff
path: root/tests/wordsplit.at
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2019-05-14 22:25:26 +0300
committerSergey Poznyakoff <gray@gnu.org>2019-05-14 22:25:26 +0300
commit1658f5685bd396ce6bfd8e4822f4a9363eb4a4c9 (patch)
treeee5e39a9f040691da09b9a569b6f000d11e1ca6a /tests/wordsplit.at
parent39beda10e855d265b5af74ea53a5d7a89a91296a (diff)
downloadgrecs-1658f5685bd396ce6bfd8e4822f4a9363eb4a4c9.tar.gz
grecs-1658f5685bd396ce6bfd8e4822f4a9363eb4a4c9.tar.bz2
Fix behaviour of $* and $@ in quoted context
Diffstat (limited to 'tests/wordsplit.at')
-rw-r--r--tests/wordsplit.at34
1 files changed, 33 insertions, 1 deletions
diff --git a/tests/wordsplit.at b/tests/wordsplit.at
index 0a9c4d6..0a7d7db 100644
--- a/tests/wordsplit.at
+++ b/tests/wordsplit.at
@@ -974,7 +974,9 @@ TOTAL: 1
TESTWSP([$* and $@],[],['one two' three 'four five'],
[$*
-$@],
+$@
+"$*"
+"$@"],
[NF: 5
0: one
1: two
@@ -987,6 +989,36 @@ NF: 3
1: three
2: "four five"
TOTAL: 3
+NF: 1
+0: "one two three four five"
+TOTAL: 1
+NF: 1
+0: "one two three four five"
+TOTAL: 1
+])
+
+TESTWSP([$* and $@ in nosplit mode],[],
+[-trimnl -nosplit 'one two' three 'four five'],
+[$*
+$@],
+[NF: 1
+0: "one two three four five"
+TOTAL: 1
+NF: 1
+0: "one two three four five"
+TOTAL: 1
+])
+
+TESTWSP([$* and $@ in nosplit mode with delimiter],[],
+[-trimnl -nosplit -delim : 'one two' three 'four five'],
+[$*
+$@],
+[NF: 1
+0: "one two:three:four five"
+TOTAL: 1
+NF: 1
+0: "one two:three:four five"
+TOTAL: 1
])
m4_popdef([TESTWSP])

Return to:

Send suggestions and report system problems to the System administrator.