1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-23 04:30:24 +02:00

48606 + 48607 + unposted test: zmathfunc: Force arguments to be numbers and catch errors.

This commit is contained in:
Daniel Shahaf 2021-04-21 21:59:45 +00:00
parent e7711e37e4
commit b0bd14035d
3 changed files with 24 additions and 4 deletions

View file

@ -44,7 +44,13 @@
?(eval):1: wrong number of arguments: max()
zsh_math_func_min "foo bar" x y z
2dDf:check errors from an unsupported use-case (workers/48156)
2d:check errors from an unsupported use-case (workers/48156)
# We expect one non-empty line of stderr, but don't care about the specific
# error message; thus, the expectation is a pattern (*), for stderr (?), which
# matches any non-empty string (?*).
#
# Sorry, Perl, but I had to give you a run for your money.
*??*
F:Calling zsh_math_func_min directly isn't a supported use-case, but if it
F:returns zero, something's probably wrong.