diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/wordsplit.at | 18 | ||||
-rw-r--r-- | tests/wsp.c | 11 |
2 files changed, 26 insertions, 3 deletions
diff --git a/tests/wordsplit.at b/tests/wordsplit.at index e3af703..1f2e80d 100644 --- a/tests/wordsplit.at +++ b/tests/wordsplit.at @@ -950,6 +950,24 @@ TOTAL: 3 [input exhausted ])) +TESTWSP([variable nosplit],[],[novar novarsplit], +[begin ${VAR:- a b} end], +[NF: 3 +0: begin +1: "${VAR:- a b}" +2: end +TOTAL: 3 +]) + +TESTWSP([command nosplit],[],[nocmd nocmdsplit], +[begin $(words a b) end], +[NF: 3 +0: begin +1: "$(words a b)" +2: end +TOTAL: 3 +]) + m4_popdef([TESTWSP]) m4_popdef([wspnum]) m4_popdef([wspid]) diff --git a/tests/wsp.c b/tests/wsp.c index cca3a36..bd13e63 100644 --- a/tests/wsp.c +++ b/tests/wsp.c @@ -61,9 +61,14 @@ struct kwd bool_keytab[] = { }; struct kwd opt_keytab[] = { - { "nullglob", WRDSO_NULLGLOB }, - { "failglob", WRDSO_FAILGLOB }, - { "dotglob", WRDSO_DOTGLOB }, + { "nullglob", WRDSO_NULLGLOB }, + { "failglob", WRDSO_FAILGLOB }, + { "dotglob", WRDSO_DOTGLOB }, + { "bskeep_words", WRDSO_BSKEEP_WORD }, + { "bskeep_quote", WRDSO_BSKEEP_QUOTE }, + { "bskeep", WRDSO_BSKEEP_WORD|WRDSO_BSKEEP_QUOTE }, + { "novarsplit", WRDSO_NOVARSPLIT }, + { "nocmdsplit", WRDSO_NOCMDSPLIT }, { NULL, 0 } }; |