Skip to content

Commit

Permalink
fix(testgen): Use Unicode values instead of xNN notation
Browse files Browse the repository at this point in the history
Previously, the generated tests from toml-test were not failing when
expected for NUL and US control characters. Using the Unicode values
for these tests instead of the \xNN notation corrected this failure.

Related to: pelletier#613
  • Loading branch information
jidicula committed Oct 5, 2021
1 parent 851d9c4 commit 6bb258e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions toml_testgen_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ func TestTOMLTest_Invalid_Control_CommentLf(t *testing.T) {
}

func TestTOMLTest_Invalid_Control_CommentNull(t *testing.T) {
input := "comment-null = \"null\" # \x00\n"
input := "comment-null = \"null\" # \u0000\n"
testgenInvalid(t, input)
}

func TestTOMLTest_Invalid_Control_CommentUs(t *testing.T) {
input := "comment-us = \"ctrl-_\" # \x1f\n"
input := "comment-us = \"ctrl-_\" # \u001f\n"
testgenInvalid(t, input)
}

Expand Down

0 comments on commit 6bb258e

Please sign in to comment.