Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Mar 2011 23:52:23 +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: r219390 - head/tools/regression/bin/sh/builtins
Message-ID:  <201103072352.p27NqNgP051147@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jilles
Date: Mon Mar  7 23:52:23 2011
New Revision: 219390
URL: http://svn.freebsd.org/changeset/base/219390

Log:
  sh: Test that . /dev/null returns exit status 0 and does not preserve $?.
  
  Preserving $? may cause problems particularly if set -e is in effect.
  
  It may be useful to preserve the old value of $? in the dot script but this
  must not be implemented in such a way that it would break this test.

Added:
  head/tools/regression/bin/sh/builtins/dot3.0   (contents, props changed)

Added: head/tools/regression/bin/sh/builtins/dot3.0
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/regression/bin/sh/builtins/dot3.0	Mon Mar  7 23:52:23 2011	(r219390)
@@ -0,0 +1,10 @@
+# $FreeBSD$
+
+# . should return 0 if no command was executed.
+
+if false; then
+	exit 3
+else
+	. /dev/null
+	exit $?
+fi



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