diff --git a/tests/checks/basic.fish b/tests/checks/basic.fish index 5bef45cc8..657b1b658 100644 --- a/tests/checks/basic.fish +++ b/tests/checks/basic.fish @@ -429,18 +429,18 @@ for foo in 1 2 3 end # Check that these error correctly. -# Simplify __fish_print_help, as it's noisy. -function __fish_print_help - echo $argv[2..] -end $dyn_break eval break -#CHECKERR: break: Not inside of loop -#CHECKERR: break: Not inside of loop +#CHECKERR: Error-message: break: Not inside of loop +#CHECKERR: Documentation for break +#CHECKERR: Error-message: break: Not inside of loop +#CHECKERR: Documentation for break $dyn_continue eval continue -#CHECKERR: continue: Not inside of loop -#CHECKERR: continue: Not inside of loop +#CHECKERR: Error-message: continue: Not inside of loop +#CHECKERR: Documentation for continue +#CHECKERR: Error-message: continue: Not inside of loop +#CHECKERR: Documentation for continue # Test implicit cd. This should do nothing. ./ diff --git a/tests/test_functions/__fish_print_help.fish b/tests/test_functions/__fish_print_help.fish index 926644091..0ecc5daab 100644 --- a/tests/test_functions/__fish_print_help.fish +++ b/tests/test_functions/__fish_print_help.fish @@ -1,4 +1,7 @@ function __fish_print_help - echo Documentation for $argv >&2 + if set -q argv[2] + echo Error-message: $argv[2] >&2 + end + echo Documentation for $argv[1] >&2 return 1 end