mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 21:33:09 +00:00
Add some additional tests for builtin math
This fills some gaps in our error message test coverage.
This commit is contained in:
parent
09ed315159
commit
0d3f943f30
1 changed files with 11 additions and 0 deletions
|
@ -161,6 +161,17 @@ not math -s 12
|
|||
not math 2^999999
|
||||
# CHECKERR: math: Error: Result is infinite
|
||||
# CHECKERR: '2^999999'
|
||||
not math 'sqrt(-1)'
|
||||
# CHECKERR: math: Error: Result is not a number
|
||||
# CHECKERR: 'sqrt(-1)'
|
||||
math 'sqrt(-0)'
|
||||
# CHECK: -0
|
||||
not math 2^53 + 1
|
||||
# CHECKERR: math: Error: Result magnitude is too large
|
||||
# CHECKERR: '2^53 + 1'
|
||||
not math -2^53 - 1
|
||||
# CHECKERR: math: Error: Result magnitude is too large
|
||||
# CHECKERR: '-2^53 - 1'
|
||||
printf '<%s>\n' (not math 1 / 0 2>&1)
|
||||
# CHECK: <math: Error: Division by zero>
|
||||
# CHECK: <'1 / 0'>
|
||||
|
|
Loading…
Reference in a new issue