]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
updated testcase
authorBVK Chaitanya <bvk.groups@gmail.com>
Thu, 29 Jul 2010 11:29:49 +0000 (16:59 +0530)
committerBVK Chaitanya <bvk.groups@gmail.com>
Thu, 29 Jul 2010 11:29:49 +0000 (16:59 +0530)
tests/grub_script_expansion.in

index 1ec58e3a9fca787ef3b693a262a7f48919ecff79..11aafc8539f502357d674104593b13a05ee693f4 100644 (file)
 # along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
 
 disks=`echo ls | @builddir@/grub-shell`
-other=`echo echo \\* | @builddir@/grub-shell`
+other=`echo echo \* | @builddir@/grub-shell`
 for d in $disks; do
-  if ! echo "$other" | grep "$d" >/dev/null; then
-    echo "$d missing from * expansion" >&2
-    exit 1
-  fi
+    if echo "$d" |grep ',' >/dev/null; then
+       if echo "$other" | grep "$d" >/dev/null; then
+           echo "$d should not occur in * expansion" >&2
+           exit 1
+       fi
+    else
+       if ! echo "$other" | grep "$d" >/dev/null; then
+           echo "$d missing from * expansion" >&2
+           exit 1
+       fi
+    fi
 done
 
 other=`echo echo '(*)' | @builddir@/grub-shell`
 for d in $disks; do
-  if ! echo "$other" | grep "$d" >/dev/null; then
-    echo "$d missing from (*) expansion" >&2
-    exit 1
-  fi
+    if ! echo "$other" | grep "$d" >/dev/null; then
+       echo "$d missing from (*) expansion" >&2
+       exit 1
+    fi
 done