1
#! @builddir@/grub-shell-tester
3
# Copyright (C) 2010 Free Software Foundation, Inc.
5
# GRUB is free software: you can redistribute it and/or modify
6
# it under the terms of the GNU General Public License as published by
7
# the Free Software Foundation, either version 3 of the License, or
8
# (at your option) any later version.
10
# GRUB is distributed in the hope that it will be useful,
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
# GNU General Public License for more details.
15
# You should have received a copy of the GNU General Public License
16
# along with GRUB. If not, see <http://www.gnu.org/licenses/>.
31
# Negated forms (copied from grub_script_if.in)
35
if ! true; then echo yes; fi
37
#basic if, no execution
38
if ! false; then echo no; fi
40
#if else, execute if path
41
if ! true; then echo yes; else echo no; fi
43
#if else, execute else path
44
if ! false; then echo no; else echo yes; fi
46
#if elif, execute elif
47
if ! false; then echo no; elif ! true; then echo yes; fi
49
#if elif else, execute else
50
if ! false; then echo no; elif ! false; then echo no; else echo yes; fi
52
#if elif(1) elif(2), execute elif(2)
53
if false; then echo no; elif ! false; then echo no; elif ! true; then echo yes; fi
55
#if elif(1) elif(2) else, execute else
56
if false; then echo no; elif false; then echo no; elif ! false; then echo no; else echo yes; fi
58
#if {if elif else}, execute elif
59
if true; then if false; then echo no; elif ! true; then echo yes; else echo no; fi; fi
61
#if {if elif} else, execute elif. ofcourse no dangling-else problem due to "fi"
62
if true; then if ! false; then echo no; elif true; then echo yes; fi; else echo no; fi