]> git.proxmox.com Git - grub2.git/blame - tests/grub_script_if.in
usb: Avoid possible out-of-bound accesses caused by malicious devices
[grub2.git] / tests / grub_script_if.in
CommitLineData
0f3a3e3e
BC
1#! @builddir@/grub-shell-tester
2
3#basic if, execute
4if true; then echo yes; fi
5
6#basic if, no execution
7if false; then echo no; fi
8
9#if else, execute if path
10if true; then echo yes; else echo no; fi
11
12#if else, execute else path
13if false; then echo no; else echo yes; fi
14
15#if elif, execute elif
16if false; then echo no; elif true; then echo yes; fi
17
18#if elif else, execute else
19if false; then echo no; elif false; then echo no; else echo yes; fi
20
21#if elif(1) elif(2), execute elif(2)
22if false; then echo no; elif false; then echo no; elif true; then echo yes; fi
23
24#if elif(1) elif(2) else, execute else
25if false; then echo no; elif false; then echo no; elif false; then echo no; else echo yes; fi
26
27#if {if elif else}, execute elif
28if true; then if false; then echo no; elif true; then echo yes; else echo no; fi; fi
29
30#if {if elif} else, execute elif. ofcourse no dangling-else problem due to "fi"
31if true; then if false; then echo no; elif true; then echo yes; fi; else echo no; fi