Fix comment handling.
* tests/grub_script_comments.in: New testcase. * conf/tests.rmk: Rules for new testcase. * script/yylex.l: Updated flex rules.
This commit is contained in:
commit
a8ebb84111
4 changed files with 42 additions and 2 deletions
|
@ -1,3 +1,11 @@
|
|||
2010-05-01 BVK Chaitanya <bvk.groups@gmail.com>
|
||||
|
||||
Fix comment handling.
|
||||
|
||||
* tests/grub_script_comments.in: New testcase.
|
||||
* conf/tests.rmk: Rules for new testcase.
|
||||
* script/yylex.l: Updated flex rules.
|
||||
|
||||
2010-04-28 Samuel Thibault <samuel.thibault@ens-lyon.org>
|
||||
|
||||
* docs/grub.texi (play): Document that zero pitches produce rests.
|
||||
|
|
|
@ -68,6 +68,9 @@ grub_script_final_semicolon_SOURCES = tests/grub_script_final_semicolon.in
|
|||
check_SCRIPTS += grub_script_dollar
|
||||
grub_script_dollar_SOURCES = tests/grub_script_dollar.in
|
||||
|
||||
check_SCRIPTS += grub_script_comments
|
||||
grub_script_comments_SOURCES = tests/grub_script_comments.in
|
||||
|
||||
# List of tests to execute on "make check"
|
||||
# SCRIPTED_TESTS = example_scripted_test
|
||||
# SCRIPTED_TESTS += example_grub_script_test
|
||||
|
@ -83,6 +86,7 @@ SCRIPTED_TESTS += grub_script_if
|
|||
SCRIPTED_TESTS += grub_script_blanklines
|
||||
SCRIPTED_TESTS += grub_script_final_semicolon
|
||||
SCRIPTED_TESTS += grub_script_dollar
|
||||
SCRIPTED_TESTS += grub_script_comments
|
||||
|
||||
# dependencies between tests and testing-tools
|
||||
$(SCRIPTED_TESTS): grub-shell grub-shell-tester
|
||||
|
|
|
@ -112,9 +112,9 @@ typedef size_t yy_size_t;
|
|||
%option extra-type="struct grub_parser_param*"
|
||||
|
||||
BLANK [ \t]
|
||||
COMMENT ^[ \t]*#.*$
|
||||
COMMENT #.*$
|
||||
|
||||
CHAR [^|&$;<> \t\n\'\"\\]
|
||||
CHAR [^{}|&$;<> \t\n\'\"\\]
|
||||
DIGITS [[:digit:]]+
|
||||
NAME [[:alpha:]_][[:alnum:][:digit:]_]*
|
||||
|
||||
|
|
28
tests/grub_script_comments.in
Normal file
28
tests/grub_script_comments.in
Normal file
|
@ -0,0 +1,28 @@
|
|||
#! @builddir@/grub-shell-tester
|
||||
#
|
||||
# Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
#
|
||||
# GRUB is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GRUB is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
echo a###b
|
||||
echo a# #b
|
||||
|
||||
echo #
|
||||
echo \#
|
||||
|
||||
echo '#'
|
||||
echo "#"
|
||||
|
||||
echo '\#'
|
||||
echo "\#"
|
Loading…
Reference in a new issue