~cyphermox/ubuntu/wily/grub2/lp1097570

1.26.4 by Colin Watson
Import upstream version 1.99~20101122
1
#! @builddir@/grub-shell-tester
2
3
# Run GRUB script in a Qemu instance
4
# Copyright (C) 2010  Free Software Foundation, Inc.
5
#
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.
10
#
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.
15
#
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/>.
18
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
27
}
28
29
f1
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
35
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
44
}
45
46
f2
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
52
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
61
}
62
63
f3
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
69
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
78
}
79
80
f4
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