svn commit: r219390 - head/tools/regression/bin/sh/builtins

Jilles Tjoelker jilles at FreeBSD.org
Mon Mar 7 23:52:24 UTC 2011


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


More information about the svn-src-all mailing list