Upgraded GRUB2 to 2.00 release.
[AROS.git] / arch / all-pc / boot / grub2-aros / tests / grub_script_shift.in
blob785b9c396da92017d744c18ceb6b31977945e855
1 #! @builddir@/grub-shell-tester
3 # Run GRUB script in a Qemu instance
4 # Copyright (C) 2010  Free Software Foundation, Inc.
6 # GRUB is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # GRUB is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
19 function f1 {
20   echo f1 '$@' $@
21   echo f1 '$*' $*
22   echo f1 $# $1 $2 $3
23   shift
24   echo f1 '$@' $@
25   echo f1 '$*' $*
26   echo f1 $# $1 $2 $3
30 f1 a
31 f1 a b
32 f1 a b c
33 f1 a b c d
34 f1 a b c d e
36 function f2 {
37   echo f1 '$@' $@
38   echo f1 '$*' $*
39   echo f2 $# $1 $2 $3
40   shift 1
41   echo f1 '$@' $@
42   echo f1 '$*' $*
43   echo f2 $# $1 $2 $3
47 f2 a
48 f2 a b
49 f2 a b c
50 f2 a b c d
51 f2 a b c d e
53 function f3 {
54   echo f1 '$@' $@
55   echo f1 '$*' $*
56   echo f3 $# $1 $2 $3
57   shift 3
58   echo f1 '$@' $@
59   echo f1 '$*' $*
60   echo f3 $# $1 $2 $3
64 f3 a
65 f3 a b
66 f3 a b c
67 f3 a b c d
68 f3 a b c d e
70 function f4 {
71   echo f1 '$@' $@
72   echo f1 '$*' $*
73   echo f4 $# $1 $2 $3
74   shift 100
75   echo f1 '$@' $@
76   echo f1 '$*' $*
77   echo f4 $# $1 $2 $3
81 f4 a
82 f4 a b
83 f4 a b c
84 f4 a b c d
85 f4 a b c d e