diff --git a/lib/test/names-quoted-errors.conf b/lib/test/names-quoted-errors.conf new file mode 100644 index 00000000..d08fa7de --- /dev/null +++ b/lib/test/names-quoted-errors.conf @@ -0,0 +1,13 @@ +chip "blah-*" + +# keyword with two quoted names, no intermediate whitespace +label "in0""foo" + +# missing closing quote before EOL +label "in1" "bar + +# (correct label statement, just for separation) +label "in2" "baz" + +# missing closing quote before immediate EOF +label "in3" "baz \ No newline at end of file diff --git a/lib/test/names-quoted-errors.conf.stdout b/lib/test/names-quoted-errors.conf.stdout new file mode 100644 index 00000000..f06f725d --- /dev/null +++ b/lib/test/names-quoted-errors.conf.stdout @@ -0,0 +1,19 @@ +1: CHIP +1: NAME: blah-* +2: EOL +4: LABEL +4: ERROR +5: EOL +7: LABEL +7: NAME: in1 +7: ERROR +8: EOL +10: LABEL +10: NAME: in2 +10: NAME: baz +11: EOL +13: LABEL +13: NAME: in3 +13: ERROR +13: EOL +13: EOF diff --git a/lib/test/test-scanner.pl b/lib/test/test-scanner.pl index a8ce088a..d125dff4 100755 --- a/lib/test/test-scanner.pl +++ b/lib/test/test-scanner.pl @@ -41,6 +41,8 @@ my @scenarios = ( desc => 'invalid, unquoted names' }, { base => 'names-quoted', status => 0, desc => 'normal, quoted names' }, + { base => 'names-quoted-errors', status => 0, + desc => 'invalid, quoted names' }, ); plan tests => ($#scenarios + 1) * 3;