Fix test -a and -o precedence.
Reported by: adrian15.
This commit is contained in:
parent
82ae74d7bd
commit
daf01d61ff
4 changed files with 40 additions and 16 deletions
15
tests/grub_script_test.in
Normal file
15
tests/grub_script_test.in
Normal file
|
@ -0,0 +1,15 @@
|
|||
#! @builddir@/grub-shell-tester
|
||||
|
||||
for device in 'hd0' 'fd0'; do
|
||||
# But search them if their search has been inforced
|
||||
set fd0search="no"
|
||||
if [ "$device" != "fd0" -a "$device" != "cd" \
|
||||
-o \
|
||||
"$device" = "fd0" -a "$fd0search" = "yes" ]\
|
||||
; then
|
||||
echo "Yes"
|
||||
else
|
||||
echo "No"
|
||||
fi
|
||||
|
||||
done
|
Loading…
Add table
Add a link
Reference in a new issue