mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 21:33:09 +00:00
parent
321fd74de0
commit
a8fddf3d9b
1 changed files with 13 additions and 0 deletions
|
@ -222,6 +222,19 @@ expansion $foo[4..-2]
|
|||
set -l foo a
|
||||
expansion $foo[2..-1]
|
||||
#CHECK: 0
|
||||
expansion $foo[0]
|
||||
#CHECKERR: {{.*}}expansion.fish (line {{\d+}}): array indices start at 1, not 0.
|
||||
#CHECKERR: expansion $foo[0]
|
||||
#CHECKERR: ^
|
||||
# see https://github.com/fish-shell/fish-shell/issues/8213
|
||||
expansion $foo[1..0]
|
||||
#CHECKERR: {{.*}}expansion.fish (line {{\d+}}): array indices start at 1, not 0.
|
||||
#CHECKERR: expansion $foo[1..0]
|
||||
#CHECKERR: ^
|
||||
expansion $foo[-0]
|
||||
#CHECKERR: {{.*}}expansion.fish (line {{\d+}}): array indices start at 1, not 0.
|
||||
#CHECKERR: expansion $foo[-0]
|
||||
#CHECKERR: ^
|
||||
|
||||
echo "$foo[d]"
|
||||
#CHECKERR: {{.*}}expansion.fish (line {{\d+}}): Invalid index value
|
||||
|
|
Loading…
Reference in a new issue