Add more tests

These were correct, but littlecheck escapes quotes!
This commit is contained in:
Fabian Boehm 2022-08-11 18:20:40 +02:00
parent c1bf06d5b1
commit c3fb927c9a
4 changed files with 6 additions and 5 deletions

View file

@ -31,7 +31,7 @@ echo $status
# CHECK: 123 # CHECK: 123
# CHECKERR: {{.*}}checks/eval.fish (line {{\d+}}): The expanded command was empty. # CHECKERR: {{.*}}checks/eval.fish (line {{\d+}}): The expanded command was empty.
# CHECKERR: "" # CHECKERR: ""
# CHECKERR: ^ # CHECKERR: ^^
function empty function empty
end end

View file

@ -7,7 +7,7 @@ echo $status
# CHECK: 123 # CHECK: 123
# CHECKERR: {{.*}} The expanded command was empty. # CHECKERR: {{.*}} The expanded command was empty.
# CHECKERR: $empty_var # CHECKERR: $empty_var
# CHECKERR: ^ # CHECKERR: ^~~~~~~~~^
# Failed expansions # Failed expansions
echo "$abc[" echo "$abc["

View file

@ -46,4 +46,5 @@ $fish -c 'time true&'
$fish -c 'not time true&' $fish -c 'not time true&'
#CHECKERR: fish: {{.*}} #CHECKERR: fish: {{.*}}
#CHECKERR: not time true& #CHECKERR: not time true&
#CHECKERR: ^ #FIXME: This error marks the entire statement. Would be cool to mark just `time true&`.
#CHECKERR: ^~~~~~~~~~~~~^

View file

@ -4,11 +4,11 @@
$EMPTY_VARIABLE $EMPTY_VARIABLE
#CHECKERR: {{.*}}checks/vars_as_commands.fish (line {{\d+}}): The expanded command was empty. #CHECKERR: {{.*}}checks/vars_as_commands.fish (line {{\d+}}): The expanded command was empty.
#CHECKERR: $EMPTY_VARIABLE #CHECKERR: $EMPTY_VARIABLE
#CHECKERR: ^ #CHECKERR: ^~~~~~~~~~~~~~^
"$EMPTY_VARIABLE" "$EMPTY_VARIABLE"
#CHECKERR: {{.*}}checks/vars_as_commands.fish (line {{\d+}}): The expanded command was empty. #CHECKERR: {{.*}}checks/vars_as_commands.fish (line {{\d+}}): The expanded command was empty.
#CHECKERR: "$EMPTY_VARIABLE" #CHECKERR: "$EMPTY_VARIABLE"
#CHECKERR: ^ #CHECKERR: ^~~~~~~~~~~~~~~~^
set CMD1 echo basic command as variable set CMD1 echo basic command as variable
$CMD1 $CMD1