math: Add length to missing operator error

This commit is contained in:
Fabian Boehm
2022-09-08 18:45:41 +02:00
parent 52e065e479
commit a3ee7da812
2 changed files with 9 additions and 5 deletions

View File

@@ -131,6 +131,11 @@ not math '2 + 2 4'
# This regex to check whitespace - the error appears between the second 2 and the 4!
# (right after the 2)
# CHECKERR: {{^}} ^
printf '<%s>\n' (math '2 + 2 4' 2>&1)
# CHECK: <math: Error: Missing operator>
# CHECK: <'2 + 2 4'>
# CHECK: < ^~~~~^>
not math '(1 2)'
# CHECKERR: math: Error: Missing operator
# CHECKERR: '(1 2)'