Skip to content

Commit

Permalink
asm/lexer: Add hexadecimal escape sequence test cases. Updates #8.
Browse files Browse the repository at this point in the history
  • Loading branch information
mewmew committed Jan 16, 2015
1 parent a516ce8 commit 7a3f525
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions asm/lexer/lexer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,15 @@ func TestParse(t *testing.T) {
{Kind: token.EOF, Pos: 15},
},
},
// i=14
{
input: `"\foo""\de\ad\be\ef"`,
want: []token.Token{
{Kind: token.String, Val: `\foo`, Pos: 0},
{Kind: token.String, Val: "\xDE\xAD\xBE\xEF", Pos: 6},
{Kind: token.EOF, Pos: 20},
},
},
}
for i, g := range golden {
got := Parse(g.input)
Expand Down

0 comments on commit 7a3f525

Please sign in to comment.