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.

(cherry picked from commit ab543adbe3)
This commit is contained in:
Seebs 2022-11-10 14:18:30 -06:00 committed by Fletcher Haynes
parent 04aa8b18fc
commit 575f2c04a5
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

@ -344,21 +344,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": `Æ漢д ☮♬ ♞🜻💣`,
},
}},
{
@ -373,7 +373,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{}{
@ -381,7 +381,7 @@ func TestPQLDeepEquality(t *testing.T) {
"a": "∑",
},
Children: []*Call{
{Name: "Row", Args: map[string]interface{}{"unicode": <EFBFBD>漢д ☮♬ ♞🜻💣"}},
{Name: "Row", Args: map[string]interface{}{"unicode": 漢д ☮♬ ♞🜻💣"}},
},
}},
{