mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-14 14:03:58 +00:00
Add more tests
These were correct, but littlecheck escapes quotes!
This commit is contained in:
parent
c1bf06d5b1
commit
c3fb927c9a
4 changed files with 6 additions and 5 deletions
|
@ -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
|
||||||
|
|
|
@ -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["
|
||||||
|
|
|
@ -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: ^~~~~~~~~~~~~^
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue