diff --git a/ChangeLog b/ChangeLog index 8d2f73c48..65d7b9068 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2010-03-26 BVK Chaitanya + + 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 Blank lines testcase for GRUB script. diff --git a/conf/tests.rmk b/conf/tests.rmk index 88ce09e60..ca1f0cd71 100644 --- a/conf/tests.rmk +++ b/conf/tests.rmk @@ -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 diff --git a/script/parser.y b/script/parser.y index caba0f433..fdd3f7589 100644 --- a/script/parser.y +++ b/script/parser.y @@ -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; diff --git a/tests/grub_script_final_semicolon.in b/tests/grub_script_final_semicolon.in new file mode 100644 index 000000000..99e55e545 --- /dev/null +++ b/tests/grub_script_final_semicolon.in @@ -0,0 +1,10 @@ +#! /bin/sh -e + +@builddir@/grub-script-check <