mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-15 23:22:53 +08: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
@ -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…
x
Reference in New Issue
Block a user