mirror of
https://github.com/ascii-boxes/boxes.git
synced 2024-12-04 14:03:53 +01:00
Add error test case for unterminated strings in the config file
This commit is contained in:
parent
ac8617b383
commit
beb8696a79
24
test/120_parser_unterminated_string.cfg
Normal file
24
test/120_parser_unterminated_string.cfg
Normal file
@ -0,0 +1,24 @@
|
||||
BOX testbox1
|
||||
|
||||
escaped "aaa\"bbb\\\"ccc#" # the string aaa"bbb\"ccc#
|
||||
errored "aaa\\"bbb" # unterminated!
|
||||
|
||||
sample
|
||||
#
|
||||
# regular comments used in Perl, Shell scripts, etc.
|
||||
#
|
||||
ends
|
||||
|
||||
shapes {
|
||||
w ("#")
|
||||
}
|
||||
|
||||
elastic (
|
||||
w
|
||||
)
|
||||
|
||||
padding {
|
||||
left 1
|
||||
}
|
||||
|
||||
END testbox1
|
11
test/120_parser_unterminated_string.txt
Normal file
11
test/120_parser_unterminated_string.txt
Normal file
@ -0,0 +1,11 @@
|
||||
:ARGS
|
||||
-f 120_parser_unterminated_string.cfg
|
||||
:INPUT
|
||||
foo
|
||||
:OUTPUT-FILTER
|
||||
:EXPECTED-ERROR 1
|
||||
boxes: 120_parser_unterminated_string.cfg: line 4: Unterminated String -- " # unterminated!
|
||||
boxes: 120_parser_unterminated_string.cfg: line 4: syntax error
|
||||
boxes: 120_parser_unterminated_string.cfg: line 4: skipping to next design
|
||||
boxes: 120_parser_unterminated_string.cfg: line 25: no valid designs found
|
||||
:EOF
|
Loading…
Reference in New Issue
Block a user