Make test error when number is invalid nicer

This would print the default "Argument is invalid" error string, which
is *true* but not super obvious, because `test` doesn't always perform
numeric conversion, and that's the bit that failed here.
This commit is contained in:
Fabian Homborg
2021-04-24 11:18:58 +02:00
parent fc0dd49842
commit 3cccb77b52
2 changed files with 3 additions and 1 deletions

View File

@@ -37,7 +37,7 @@ function t
end
t foo
# CHECKERR: Invalid argument: 'foo'
# CHECKERR: Argument is not a number: 'foo'
# CHECKERR: {{.*}}test.fish (line {{\d+}}):
# CHECKERR: test $argv[1] -eq 5
# CHECKERR: ^