Port some smaller tests to littlecheck

This commit is contained in:
Fabian Homborg
2020-02-07 22:10:55 +01:00
parent eaf84c553d
commit f8af262af7
23 changed files with 102 additions and 115 deletions

View 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