Fix test -a and -o precedence.

Reported by: adrian15.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2013-05-04 13:38:59 +02:00
parent 82ae74d7bd
commit daf01d61ff
4 changed files with 40 additions and 16 deletions

15
tests/grub_script_test.in Normal file
View 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