From 004baba2d6857a3cc0c5d25020ec257169a2d2b7 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Sun, 20 May 2007 22:22:18 +0000 Subject: hush: fix shift + $0 bug; add testcase --- shell/hush_test/hush-misc/shift.right | 2 ++ shell/hush_test/hush-misc/shift.tests | 6 ++++++ 2 files changed, 8 insertions(+) create mode 100644 shell/hush_test/hush-misc/shift.right create mode 100644 shell/hush_test/hush-misc/shift.tests (limited to 'shell/hush_test') diff --git a/shell/hush_test/hush-misc/shift.right b/shell/hush_test/hush-misc/shift.right new file mode 100644 index 000000000..afb90be9c --- /dev/null +++ b/shell/hush_test/hush-misc/shift.right @@ -0,0 +1,2 @@ +./shift.tests abc d e +./shift.tests d e diff --git a/shell/hush_test/hush-misc/shift.tests b/shell/hush_test/hush-misc/shift.tests new file mode 100644 index 000000000..17f2c9f36 --- /dev/null +++ b/shell/hush_test/hush-misc/shift.tests @@ -0,0 +1,6 @@ +if test $# = 0; then + exec "$THIS_SH" $0 abc "d e" +fi +echo $0 $1 $2 +shift +echo $0 $1 $2 -- cgit v1.2.3