aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/wordsplit.at13
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/wordsplit.at b/tests/wordsplit.at
index 631d939..e3af703 100644
--- a/tests/wordsplit.at
+++ b/tests/wordsplit.at
@@ -259,30 +259,39 @@ TESTWSP([K/V environment],[wsp-env-kv wsp-env_kv],
1: aqux
TOTAL: 2
],
[],
[FOO=bar BAZ=qux])
-TESTWSP([nosplit with expansion],[wsp-var-nosplit],[nosplit],
+TESTWSP([nosplit with variable expansion],[wsp-var-nosplit],[nosplit],
[a $FOO test],
[NF: 1
0: "a variable expansion test\n"
TOTAL: 1
],
[],
[FOO="variable expansion"])
-TESTWSP([nosplit without expansion],[],[nosplit novar],
+TESTWSP([nosplit without variable expansion],[],[nosplit novar],
[a $FOO test],
[NF: 1
0: "a $FOO test\n"
TOTAL: 1
],
[],
[FOO="variable expansion"])
+TESTWSP([nosplit: empty expansion],[],[nosplit trimnl],
+[$FOO],
+[NF: 1
+0: ""
+TOTAL: 1
+],
+[],
+[FOO=""])
+
TESTWSP([default value (defined)],[],[],
[${FOO:-bar}],
[NF: 1
0: qux
TOTAL: 1
],

Return to:

Send suggestions and report system problems to the System administrator.