diff options
Diffstat (limited to 'Test/D04parameter.ztst')
-rw-r--r-- | Test/D04parameter.ztst | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/Test/D04parameter.ztst b/Test/D04parameter.ztst index 7cb297e0c..35630c5ca 100644 --- a/Test/D04parameter.ztst +++ b/Test/D04parameter.ztst @@ -1920,3 +1920,58 @@ print $array 0:"-" works after "[" in same expression (Dash problem) >foo two three + + ( + setopt shwordsplit + set -- whim:wham:whom + IFS=: + print -l $@ + ) +0:Splitting of $@ on IFS: single element +>whim +>wham +>whom + + ( + setopt shwordsplit + set -- one:two bucklemy:shoe + IFS=: + print -l $@ + ) +0:Splitting of $@ on IFS: multiple elements +# No forced joining in this case +>one +>two +>bucklemy +>shoe + + ( + set -- one:two bucklemy:shoe + print -l ${(s.:.)@} + ) +0:Splitting of $@ on (s): multiple elements +# Forced joining in this case +>one +>two bucklemy +>shoe + + ( + set -- one:two bucklemy:shoe + print -l ${(@s.:.)@} + ) +0:Splitting of $@ on (@s): multiple elements +# Forced non-joining in this case +>one +>two +>bucklemy +>shoe + + ( + set -- one:two bucklemy:shoe + IFS= + setopt shwordsplit + print -l ${@} + ) +0:Joining of $@ does not happen when IFS is empty +>one:two +>bucklemy:shoe |