summaryrefslogtreecommitdiff
path: root/Test/D04parameter.ztst
diff options
context:
space:
mode:
Diffstat (limited to 'Test/D04parameter.ztst')
-rw-r--r--Test/D04parameter.ztst21
1 files changed, 21 insertions, 0 deletions
diff --git a/Test/D04parameter.ztst b/Test/D04parameter.ztst
index 2fd2f975f..0d44558a7 100644
--- a/Test/D04parameter.ztst
+++ b/Test/D04parameter.ztst
@@ -2280,6 +2280,27 @@ F:We do not care what $OLDPWD is, as long as it does not cause an error
F:As of this writing, var=$@ and var="$@" with null IFS have unspecified
F:behavior, see http://austingroupbugs.net/view.php?id=888
+ (
+ IFS=$'\x80'
+ if [[ $IFS = $' \t\n\0' ]]; then
+ echo OK # if $'\x80' is illegal (e.g. Linux)
+ else # otherwise (e.g. macOS), it should work as a separator
+ s=$'foo\x80\bar'
+ [[ ${${=s}[1]} = foo ]] && echo OK
+ fi
+ )
+0D:reset IFS to default if it contains illegal character
+>OK
+
+ (
+ unsetopt multibyte
+ IFS=$'\xc3\xa9'
+ s=$'foo\xc3bar\xa9boo'
+ echo ${${=s}[2]}
+ )
+0:eight bit chars in IFS should work if multibute option is off
+>bar
+
() {
setopt localoptions extendedglob
[[ $- = [[:alnum:]]## ]] || print Failed 1