diff options
author | Dmitrij Czarkoff <czarkoff@cvs.openbsd.org> | 2016-03-05 12:30:18 +0000 |
---|---|---|
committer | Dmitrij Czarkoff <czarkoff@cvs.openbsd.org> | 2016-03-05 12:30:18 +0000 |
commit | 4891607afdded0cafbf74b6b9c36b7899cd89704 (patch) | |
tree | 0138d5404e98729a920e1922438b779b8f4b3bf5 /regress/bin/ksh | |
parent | fae4c9c841e061dff9b9edacae7cce3449beb085 (diff) |
POSIX-compliant behavior of "set -u" regarding "$*" and "$@" specials
All work done by Martijn Dekker
OK millert@
Diffstat (limited to 'regress/bin/ksh')
-rw-r--r-- | regress/bin/ksh/obsd-regress.t | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/regress/bin/ksh/obsd-regress.t b/regress/bin/ksh/obsd-regress.t index e7988f5ca03..26759c89cbb 100644 --- a/regress/bin/ksh/obsd-regress.t +++ b/regress/bin/ksh/obsd-regress.t @@ -1,4 +1,4 @@ -# $OpenBSD: obsd-regress.t,v 1.1 2013/12/02 20:39:44 millert Exp $ +# $OpenBSD: obsd-regress.t,v 1.2 2016/03/05 12:30:17 czarkoff Exp $ # # ksh regression tests from OpenBSD @@ -273,3 +273,14 @@ stdin: set foo bar baz ; for out in ; do echo $out ; done --- + +name: shellopt-u-1 +description: + Check that "$@" and "$*" are exempt from 'set -u' (nounset) +stdin: + set -u + : "$@$*$1" +expected-exit: e == 1 +expected-stderr-pattern: + /: 1: parameter not set$/ +--- |