svn commit: r204017 - head/tools/regression/bin/sh/expansion
Jilles Tjoelker
jilles at FreeBSD.org
Wed Feb 17 22:25:23 UTC 2010
Author: jilles
Date: Wed Feb 17 22:25:22 2010
New Revision: 204017
URL: http://svn.freebsd.org/changeset/base/204017
Log:
sh: arith: Add a test for a bug in the dash arith code,
which I plan to import at some point.
Our current code handles it fine and it should stay that way.
Added:
head/tools/regression/bin/sh/expansion/arith3.0 (contents, props changed)
Added: head/tools/regression/bin/sh/expansion/arith3.0
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/tools/regression/bin/sh/expansion/arith3.0 Wed Feb 17 22:25:22 2010 (r204017)
@@ -0,0 +1,14 @@
+# $FreeBSD$
+
+failures=0
+
+check() {
+ if [ $(($1)) != $2 ]; then
+ failures=$((failures+1))
+ echo "For $1, expected $2 actual $(($1))"
+ fi
+}
+
+check "1 << 1 + 1 | 1" 5
+
+exit $((failures != 0))
More information about the svn-src-all
mailing list