Date: Sat, 21 May 2011 14:52:27 +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: r222158 - head/tools/regression/bin/sh/parameters Message-ID: <201105211452.p4LEqRLw034305@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jilles Date: Sat May 21 14:52:26 2011 New Revision: 222158 URL: http://svn.freebsd.org/changeset/base/222158 Log: sh: Add test for positional parameters with more than one digit. This also passes on stable/8. Added: head/tools/regression/bin/sh/parameters/positional1.0 (contents, props changed) Added: head/tools/regression/bin/sh/parameters/positional1.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/parameters/positional1.0 Sat May 21 14:52:26 2011 (r222158) @@ -0,0 +1,13 @@ +# $FreeBSD$ + +set -- a b c d e f g h i j +[ "$1" = a ] || echo "error at line $LINENO" +[ "${1}" = a ] || echo "error at line $LINENO" +[ "${1-foo}" = a ] || echo "error at line $LINENO" +[ "${1+foo}" = foo ] || echo "error at line $LINENO" +[ "$1+foo" = a+foo ] || echo "error at line $LINENO" +[ "$10" = a0 ] || echo "error at line $LINENO" +[ "$100" = a00 ] || echo "error at line $LINENO" +[ "${10}" = j ] || echo "error at line $LINENO" +[ "${10-foo}" = j ] || echo "error at line $LINENO" +[ "${100-foo}" = foo ] || echo "error at line $LINENO"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105211452.p4LEqRLw034305>