fish-shell/tests/expansion.err
Kevin Ballard 2974025010 Fix error span for invalid slice indexes
The span now properly points at the token that was invalid, rather than
the start of the slice.

Also fix the span for `()[1]` and `()[d]`, which were previously
reporting no source location at all.
2014-08-21 01:10:07 -07:00

30 lines
628 B
Text

Array index out of bounds
fish: show "$foo[2]"
^
Array index out of bounds
fish: show $foo[2]
^
Array index out of bounds
fish: show "$foo[1 2]"
^
Array index out of bounds
fish: show $foo[1 2]
^
Array index out of bounds
fish: show "$foo[2 1]"
^
Array index out of bounds
fish: show $foo[2 1]
^
Invalid index value
fish: echo "$foo[d]"
^
Invalid index value
fish: echo $foo[d]
^
Array index out of bounds
fish: echo ()[1]
^
Invalid index value
fish: echo ()[d]
^