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

Jilles Tjoelker jilles at FreeBSD.org
Sun May 29 15:02:10 UTC 2011


Author: jilles
Date: Sun May 29 15:02:10 2011
New Revision: 222451
URL: http://svn.freebsd.org/changeset/base/222451

Log:
  sh: Add test for 'set +o'.

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

Added: head/tools/regression/bin/sh/builtins/set1.0
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/regression/bin/sh/builtins/set1.0	Sun May 29 15:02:10 2011	(r222451)
@@ -0,0 +1,32 @@
+# $FreeBSD$
+
+set +C
+set +f
+set -e
+
+settings=$(set +o)
+set -C
+set -f
+set +e
+case $- in
+*C*) ;;
+*) echo missing C ;;
+esac
+case $- in
+*f*) ;;
+*) echo missing C ;;
+esac
+case $- in
+*e*) echo bad e ;;
+esac
+eval "$settings"
+case $- in
+*C*) echo bad C ;;
+esac
+case $- in
+*f*) echo bad f ;;
+esac
+case $- in
+*e*) ;;
+*) echo missing e ;;
+esac


More information about the svn-src-head mailing list