mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 21:33:09 +00:00
Reindent final check
This included some things in its string, so `fish_indent` would stomp over it.
This commit is contained in:
parent
9367d4ff71
commit
9f984ee897
1 changed files with 18 additions and 10 deletions
|
@ -69,18 +69,24 @@ frob
|
||||||
function name1 -a arg1 arg2
|
function name1 -a arg1 arg2
|
||||||
echo hello
|
echo hello
|
||||||
end
|
end
|
||||||
function -a arg1 arg2 name2 ; end
|
function -a arg1 arg2 name2
|
||||||
|
end
|
||||||
#CHECKERR: {{.*}}checks/function.fish (line {{\d+}}): function: Illegal function name '-a'
|
#CHECKERR: {{.*}}checks/function.fish (line {{\d+}}): function: Illegal function name '-a'
|
||||||
#CHECKERR: function -a arg1 arg2 name2 ; end
|
#CHECKERR: function -a arg1 arg2 name2
|
||||||
#CHECKERR: ^
|
#CHECKERR: ^
|
||||||
function name3 --argument-names arg1 arg2 ; echo hello; echo goodbye; end
|
function name3 --argument-names arg1 arg2
|
||||||
function --argument-names arg1 arg2 name4 ; end
|
echo hello
|
||||||
|
echo goodbye
|
||||||
|
end
|
||||||
|
function --argument-names arg1 arg2 name4
|
||||||
|
end
|
||||||
#CHECKERR: {{.*}}checks/function.fish (line {{\d+}}): function: Illegal function name '--argument-names'
|
#CHECKERR: {{.*}}checks/function.fish (line {{\d+}}): function: Illegal function name '--argument-names'
|
||||||
#CHECKERR: function --argument-names arg1 arg2 name4 ; end
|
#CHECKERR: function --argument-names arg1 arg2 name4
|
||||||
#CHECKERR: ^
|
#CHECKERR: ^
|
||||||
function name5 abc --argument-names def ; end
|
function name5 abc --argument-names def
|
||||||
|
end
|
||||||
#CHECKERR: {{.*}}checks/function.fish (line {{\d+}}): function: Unexpected positional argument 'abc'
|
#CHECKERR: {{.*}}checks/function.fish (line {{\d+}}): function: Unexpected positional argument 'abc'
|
||||||
#CHECKERR: function name5 abc --argument-names def ; end
|
#CHECKERR: function name5 abc --argument-names def
|
||||||
#CHECKERR: ^
|
#CHECKERR: ^
|
||||||
functions -q name1; and echo "Function name1 found"
|
functions -q name1; and echo "Function name1 found"
|
||||||
functions -q name2; or echo "Function name2 not found as expected"
|
functions -q name2; or echo "Function name2 not found as expected"
|
||||||
|
@ -110,12 +116,14 @@ test "$name1[3..-1]" = "$name1a[2..-1]"; and echo "1 = 1a"
|
||||||
test "$name3[3..-1]" = "$name3a[2..-1]"; and echo "3 = 3a"
|
test "$name3[3..-1]" = "$name3a[2..-1]"; and echo "3 = 3a"
|
||||||
#CHECK: 3 = 3a
|
#CHECK: 3 = 3a
|
||||||
|
|
||||||
function test; echo banana; end
|
function test
|
||||||
|
echo banana
|
||||||
|
end
|
||||||
#CHECKERR: {{.*}}checks/function.fish (line {{\d+}}): function: The name 'test' is reserved,
|
#CHECKERR: {{.*}}checks/function.fish (line {{\d+}}): function: The name 'test' is reserved,
|
||||||
#CHECKERR: and can not be used as a function name
|
#CHECKERR: and can not be used as a function name
|
||||||
#CHECKERR: function test; echo banana; end
|
#CHECKERR: function test
|
||||||
#CHECKERR: ^
|
#CHECKERR: ^
|
||||||
|
|
||||||
functions -q; or echo "False"
|
functions -q; or echo False
|
||||||
#CHECK: False
|
#CHECK: False
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Reference in a new issue