Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Feb 2010 22:25:22 +0000 (UTC)
From:      Jilles Tjoelker <jilles@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r204017 - head/tools/regression/bin/sh/expansion
Message-ID:  <201002172225.o1HMPMdt074608@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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))



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201002172225.o1HMPMdt074608>