From 6d2b152f70e17f86c892f02335f68068523dd320 Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Sun, 11 Mar 2012 22:12:05 +0000 Subject: [PATCH] sh: Add a test for variables with underscores in arithmetic. Things like $((_x+1)) are broken in stable/8 sh but work in stable/9 and head. --- tools/regression/bin/sh/expansion/arith12.0 | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 tools/regression/bin/sh/expansion/arith12.0 diff --git a/tools/regression/bin/sh/expansion/arith12.0 b/tools/regression/bin/sh/expansion/arith12.0 new file mode 100644 index 000000000000..cb7da3b2e21a --- /dev/null +++ b/tools/regression/bin/sh/expansion/arith12.0 @@ -0,0 +1,4 @@ +# $FreeBSD$ + +_x=4 y_=5 z_z=6 +[ "$((_x*100+y_*10+z_z))" = 456 ]