Skip to content

Commit

Permalink
Add some negative testcases for hexadecimal and octal parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
markuspf committed Nov 9, 2016
1 parent eaf8f79 commit 0d7a403
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tst/testinstall/strings.tst
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,28 @@ gap> x:="\0x42\0x23\0x10\0x10\0x10";
"B#\020\020\020"
gap> x:="A string with \0xFF Hex stuff \0x42 in it";
"A string with \377 Hex stuff B in it"
gap> "\0yab";
Syntax error: Expecting hexadecimal escape, or two more octal digits in stream\
:1
"\0yab";
^
gap> "\090";
Syntax error: Expecting hexadecimal escape, or two more octal digits in stream\
:1
"\090";
^
gap> "\0x1g";
Syntax error: Expecting hexadecimal digit in stream:1
"\0x1g";
^
gap> '\0x1bc';
Syntax error: Missing single quote in character constant in stream:1
'\0x1bc';
^
Syntax error: ; expected in stream:2
^
gap> "\0x1bc";
"\033c"

# Empty string
gap> x:="";
Expand Down

0 comments on commit 0d7a403

Please sign in to comment.