Test division by zero with min

This would actually return any finite argument before!
This commit is contained in:
Fabian Boehm 2022-09-08 21:32:09 +02:00
parent 24fd26ae6e
commit bc1a5ba033

View file

@ -169,6 +169,10 @@ printf '<%s>\n' (math 1 % 0 - 5 2>&1)
# CHECK: <math: Error: Division by zero>
# CHECK: <'1 % 0 - 5'>
# CHECK: < ^>
printf '<%s>\n' (math min 1 / 0, 5 2>&1)
# CHECK: <math: Error: Division by zero>
# CHECK: <'min 1 / 0, 5'>
# CHECK: < ^>
# Validate "x" as multiplier
math 0x2 # Hex