Skip to content

Commit

Permalink
[spec/ble-features] Failing test case for 'shopt -s compat_array'.
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed Apr 23, 2020
1 parent c2365f5 commit bf9f332
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions spec/ble-features.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -576,3 +576,16 @@ v=tempenv1 f4_unset global,tempenv1
[global,tempenv1,tempenv2,tempenv3] v: (unset) (unset 3)
[global,tempenv1,tempenv2,tempenv3] v: (unset) (unset 4)
## END

#### [compat_array] ${arr} is ${arr[0]}
case ${SH##*/} in (dash|ash) exit 1;; esac # dash/ash does not have arrays
case ${SH##*/} in (osh) shopt -s compat_array;; esac
case ${SH##*/} in (zsh) setopt KSH_ARRAYS;; esac
arr=(foo bar baz)
echo "$arr"
## stdout: foo

## N-I dash/ash status: 1
## N-I dash/ash stdout-json: ""

## OK yash stdout: foo bar baz

0 comments on commit bf9f332

Please sign in to comment.