~elementary-os/elementaryos/os-patch-grub2-bionic

« back to all changes in this revision

Viewing changes to tests/grub_script_setparams.in

  • Committer: RabbitBot
  • Date: 2018-02-05 13:05:56 UTC
  • Revision ID: rabbitbot@elementary.io-20180205130556-qgaormf12qpm3v40
Initial import, version 2.02-2ubuntu4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
if test x$grubshell = xyes; then cmd=setparams; else cmd=set; fi
 
20
 
 
21
function f1 {
 
22
    echo $#
 
23
    echo "$#"
 
24
 
 
25
    echo $@
 
26
    echo "$@"
 
27
 
 
28
    echo $*
 
29
    echo "$*"
 
30
 
 
31
    echo $1 $2
 
32
    for v in "$@"; do echo $v; done
 
33
    shift
 
34
    echo $1 $2
 
35
    for v in "$@"; do echo $v; done
 
36
 
 
37
    $cmd 1 2 3 4
 
38
 
 
39
    echo $#
 
40
    echo "$#"
 
41
 
 
42
    echo $@
 
43
    echo "$@"
 
44
 
 
45
    echo $*
 
46
    echo "$*"
 
47
 
 
48
    echo $1 $2
 
49
    for v in "$@"; do echo $v; done
 
50
    shift
 
51
    echo $1 $2
 
52
    for v in "$@"; do echo $v; done
 
53
}
 
54
# f1
 
55
# f1 a
 
56
f1 a b
 
57
f1 a b c
 
58
f1 a b c d
 
59
f1 a b c d e