few more testcases

This commit is contained in:
BVK Chaitanya 2010-05-12 17:46:49 +05:30
parent b4cd82945a
commit 7b252ac27c
1 changed files with 16 additions and 0 deletions

View File

@ -17,8 +17,12 @@
# along with GRUB. If not, see <http://www.gnu.org/licenses/>.
function f1 {
echo f1 '$@' $@
echo f1 '$*' $*
echo f1 $# $1 $2 $3
shift
echo f1 '$@' $@
echo f1 '$*' $*
echo f1 $# $1 $2 $3
}
@ -30,8 +34,12 @@ f1 a b c d
f1 a b c d e
function f2 {
echo f1 '$@' $@
echo f1 '$*' $*
echo f2 $# $1 $2 $3
shift 1
echo f1 '$@' $@
echo f1 '$*' $*
echo f2 $# $1 $2 $3
}
@ -43,8 +51,12 @@ f2 a b c d
f2 a b c d e
function f3 {
echo f1 '$@' $@
echo f1 '$*' $*
echo f3 $# $1 $2 $3
shift 3
echo f1 '$@' $@
echo f1 '$*' $*
echo f3 $# $1 $2 $3
}
@ -56,8 +68,12 @@ f3 a b c d
f3 a b c d e
function f4 {
echo f1 '$@' $@
echo f1 '$*' $*
echo f4 $# $1 $2 $3
shift 100
echo f1 '$@' $@
echo f1 '$*' $*
echo f4 $# $1 $2 $3
}