mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-28 05:43:11 +00:00
math: Add tests for args via stdin and argv
This reads stdin and ignores argv, which is certainly a choice. Leaving it this way for now, and possibly discussing later.
This commit is contained in:
parent
3caabdcbc9
commit
eaa3f0486c
1 changed files with 9 additions and 0 deletions
|
@ -349,3 +349,12 @@ math -0x8p-0_3
|
|||
|
||||
echo 5 + 6 | math
|
||||
# CHECK: 11
|
||||
|
||||
# Historical: If we have arguments on stdin and argv,
|
||||
# the former takes precedence and the latter is ignored entirely.
|
||||
echo 7 + 6 | math 2 + 2
|
||||
# CHECK: 13
|
||||
|
||||
# It isn't checked at all.
|
||||
echo 7 + 8 | math not an expression
|
||||
# CHECK: 15
|
||||
|
|
Loading…
Reference in a new issue