mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 02:44:59 +00:00
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:
parent
04aa8b18fc
commit
575f2c04a5
3 changed files with 8 additions and 8 deletions
|
|
@ -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?
|
||||
|
|
|
|||
|
|
@ -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?
|
||||
|
|
|
|||
|
|
@ -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": "Æ漢д ☮♬ ♞🜻💣"}},
|
||||
},
|
||||
}},
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue