From 6176062298c7efcebaf5458c63a125de93294bc9 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Sun, 16 Dec 2007 22:20:31 +0000 Subject: 24271: handle parse failures in command substitution better --- Test/C01arith.ztst | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Test') diff --git a/Test/C01arith.ztst b/Test/C01arith.ztst index b80f78b6a..1a19ed398 100644 --- a/Test/C01arith.ztst +++ b/Test/C01arith.ztst @@ -153,3 +153,12 @@ print $(( 37#z )) 1:bases beyond 36 don't work ?(eval):1: invalid base: 37 + + print $(( 3 + "fail" )) +1:parse failure in arithmetic +?(eval):1: bad math expression: operand expected at `"fail" ' + + alias 3=echo + print $(( 3 + "OK"); echo "Worked") +0:not a parse failure because not arithmetic +>+ OK Worked -- cgit 1.4.1