drop invalid UTF8 encoding from encoding tests

Testing unicode is great, but we appear to have had a couple
of cases where we were using strings that weren't valid UTF8.

Weirdly, other instances of these strings work -- I think because
they're in raw quotes (backticks) rather than strings. Anyway,
this is what SonarCloud fusses about.
This commit is contained in:
Seebs 2022-11-10 14:18:30 -06:00 • committed by seebs
parent 20a8b5713a
commit ab543adbe3
3 changed files with 8 additions and 8 deletions

View file

@ -419,7 +419,7 @@ func TestSaslLookupFieldWithExternalId(t *testing.T) {
// - identifying duplicates is not possible without a primary key in the message
{name: "missing-data", missing: true},
{name: "normal-write", text: "D", expText: "D"},
{name: "weirdstring-1", text: "Æ<EFBFBD>漢д ☮♬ ♞🜻💣", expText: "Æ<EFBFBD>漢д ☮♬ ♞🜻💣"},
{name: "weirdstring-1", text: "Æ漢д ☮♬ ♞🜻💣", expText: "Æ漢д ☮♬ ♞🜻💣"},
{name: "weirdstring-2", text: "", expText: ""},
{name: "weirdstring-3", text: "'", expText: "'"},
{name: "doublequotes-1", text: `\"`, expText: `"`}, // is this sensible?

View file

@ -291,7 +291,7 @@ func TestLookupFieldWithExternalId(t *testing.T) {
// - identifying duplicates is not possible without a primary key in the message
{name: "missing-data", missing: true},
{name: "normal-write", text: "D", expText: "D"},
{name: "weirdstring-1", text: "Æ<EFBFBD>漢д ☮♬ ♞🜻💣", expText: "Æ<EFBFBD>漢д ☮♬ ♞🜻💣"},
{name: "weirdstring-1", text: "Æ漢д ☮♬ ♞🜻💣", expText: "Æ漢д ☮♬ ♞🜻💣"},
{name: "weirdstring-2", text: "", expText: ""},
{name: "weirdstring-3", text: "'", expText: "'"},
{name: "doublequotes-1", text: `\"`, expText: `"`}, // is this sensible?

View file

@ -343,21 +343,21 @@ func TestPQLDeepEquality(t *testing.T) {
}},
{
name: "SetWithUnicode",
call: `Set(0, unicode="Æ<EFBFBD>漢д ☮♬ ♞🜻💣")`,
call: `Set(0, unicode="Æ漢д ☮♬ ♞🜻💣")`,
exp: &Call{
Name: "Set",
Args: map[string]interface{}{
"_col": int64(0),
"unicode": `Æ<EFBFBD>漢д ☮♬ ♞🜻💣`,
"unicode": `Æ漢д ☮♬ ♞🜻💣`,
},
}},
{
name: "RowWithUnicode",
call: `Row(unicode="Æ<EFBFBD>漢д ☮♬ ♞🜻💣")`,
call: `Row(unicode="Æ漢д ☮♬ ♞🜻💣")`,
exp: &Call{
Name: "Row",
Args: map[string]interface{}{
"unicode": `Æ<EFBFBD>漢д ☮♬ ♞🜻💣`,
"unicode": `Æ漢д ☮♬ ♞🜻💣`,
},
}},
{
@ -372,7 +372,7 @@ func TestPQLDeepEquality(t *testing.T) {
}},
{
name: "TopNWithUnicode",
call: `TopN(stargazer, Row(unicode="Æ<EFBFBD>漢д ☮♬ ♞🜻💣"), a="∑")`,
call: `TopN(stargazer, Row(unicode="Æ漢д ☮♬ ♞🜻💣"), a="∑")`,
exp: &Call{
Name: "TopN",
Args: map[string]interface{}{
@ -380,7 +380,7 @@ func TestPQLDeepEquality(t *testing.T) {
"a": "∑",
},
Children: []*Call{
{Name: "Row", Args: map[string]interface{}{"unicode": "Æ<EFBFBD>漢д ☮♬ ♞🜻💣"}},
{Name: "Row", Args: map[string]interface{}{"unicode": "Æ漢д ☮♬ ♞🜻💣"}},
},
}},
{