From 6bb258e2564fb4522999aa6b5441c9c15d575899 Mon Sep 17 00:00:00 2001 From: jidicula Date: Mon, 4 Oct 2021 21:53:11 -0400 Subject: [PATCH] fix(testgen): Use Unicode values instead of xNN notation 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/go-toml#613 --- toml_testgen_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toml_testgen_test.go b/toml_testgen_test.go index 3eab4f73..8bf1ec31 100644 --- a/toml_testgen_test.go +++ b/toml_testgen_test.go @@ -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) }