fix for final semicolon bug

This commit is contained in:
BVK Chaitanya 2010-03-26 23:57:06 +05:30
commit 8d2977bb7a
4 changed files with 23 additions and 1 deletions

View File

@ -1,3 +1,11 @@
2010-03-26 BVK Chaitanya <bvk.groups@gmail.com>
Testcase and the fix for final semicolon on cmdline.
* tests/grub_script_final_semicolon.in: New testcase.
* conf/tests.rmk: Rules for the new testcase.
* script/parser.y: Grammar fix.
2010-03-26 BVK Chaitanya <bvk@localhost>
Blank lines testcase for GRUB script.

View File

@ -56,6 +56,9 @@ grub_script_for1_SOURCES = tests/grub_script_for1.in
check_SCRIPTS += grub_script_blanklines
grub_script_blanklines_SOURCES = tests/grub_script_blanklines.in
check_SCRIPTS += grub_script_final_semicolon
grub_script_final_semicolon_SOURCES = tests/grub_script_final_semicolon.in
# List of tests to execute on "make check"
# SCRIPTED_TESTS = example_scripted_test
# SCRIPTED_TESTS += example_grub_script_test
@ -67,6 +70,7 @@ SCRIPTED_TESTS += grub_script_echo_keywords
SCRIPTED_TESTS += grub_script_vars1
SCRIPTED_TESTS += grub_script_for1
SCRIPTED_TESTS += grub_script_blanklines
SCRIPTED_TESTS += grub_script_final_semicolon
# dependencies between tests and testing-tools
$(SCRIPTED_TESTS): grub-shell grub-shell-tester

View File

@ -92,7 +92,7 @@ script: newlines0
{
$$ = 0;
}
| script statement delimiter
| script statement delimiter newlines0
{
struct grub_script_cmdblock *cmdblock;
cmdblock = (struct grub_script_cmdblock *) $1;

View File

@ -0,0 +1,10 @@
#! /bin/sh -e
@builddir@/grub-script-check <<EOF
echo one;
echo one; echo two
echo one; echo two;
echo one ; echo two ;
echo one ; echo two ; echo three
echo one; echo two ; echo three;
EOF