diff options
author | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2017-08-07 18:47:43 +0100 |
---|---|---|
committer | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2017-08-07 18:47:43 +0100 |
commit | 2eacbef91913fe967335812900d43cf2edfa54d9 (patch) | |
tree | 04c2e430d8310851464712757b8a7b3992517470 /Test/E01options.ztst | |
parent | 462dd51fb0036d702af054e4fa15290412be2af1 (diff) | |
download | zsh-2eacbef91913fe967335812900d43cf2edfa54d9.tar.gz zsh-2eacbef91913fe967335812900d43cf2edfa54d9.tar.xz zsh-2eacbef91913fe967335812900d43cf2edfa54d9.zip |
41499 (with one further tweak): POSIX_STRINGS behaviour.
Ignore a terminating delimiter when splitting as separators despite being called separators are terminators.
Diffstat (limited to 'Test/E01options.ztst')
-rw-r--r-- | Test/E01options.ztst | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/Test/E01options.ztst b/Test/E01options.ztst index f01d83567..b394e7cf4 100644 --- a/Test/E01options.ztst +++ b/Test/E01options.ztst @@ -1339,3 +1339,44 @@ ?(anon):4: `break' active at end of function scope ?(anon):4: `break' active at end of function scope ?(anon):4: `break' active at end of function scope + + for opt in POSIX_STRINGS NO_POSIX_STRINGS; do + var="foo bar " + (setopt $opt; print -l X "${=var}" Y) + var="foo2::bar2:" + (setopt $opt; IFS=:; print -l X "${=var}" Y) + var="foo3:bar3::" + (setopt $opt; IFS=:; print -l X "${=var}" Y) + done +0:POSIX_STRINGS effect on final delimiters +>X +>foo +>bar +>Y +>X +>foo2 +> +>bar2 +>Y +>X +>foo3 +>bar3 +> +>Y +>X +>foo +>bar +> +>Y +>X +>foo2 +> +>bar2 +> +>Y +>X +>foo3 +>bar3 +> +> +>Y |