mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-28 07:31:14 -03:00
Port some smaller tests to littlecheck
This commit is contained in:
18
tests/checks/zero_based_array.fish
Normal file
18
tests/checks/zero_based_array.fish
Normal file
@@ -0,0 +1,18 @@
|
||||
#RUN: %fish %s
|
||||
echo $foo[0]
|
||||
echo $foo[ 0 ]
|
||||
echo $foo[ 00 ]
|
||||
#CHECKERR: {{.*}}checks/zero_based_array.fish (line {{\d+}}): array indices start at 1, not 0.
|
||||
#CHECKERR: echo $foo[0]
|
||||
#CHECKERR: ^
|
||||
#CHECKERR: {{.*}}checks/zero_based_array.fish (line {{\d+}}): array indices start at 1, not 0.
|
||||
#CHECKERR: echo $foo[ 0 ]
|
||||
#CHECKERR: ^
|
||||
#CHECKERR: {{.*}}checks/zero_based_array.fish (line {{\d+}}): array indices start at 1, not 0.
|
||||
#CHECKERR: echo $foo[ 00 ]
|
||||
#CHECKERR: ^
|
||||
|
||||
# and make sure these didn't break
|
||||
set -l foo one two three
|
||||
echo $foo[001]
|
||||
#CHECK: one
|
||||
Reference in New Issue
Block a user