Fixing issue with compliance export encoding (#7042)

Этот коммит содержится в:
Corey Hulen
2017-07-28 09:32:37 -06:00
коммит произвёл GitHub
родитель 2d43e99757
Коммит 571e4f2ae1
2 изменённых файлов: 41 добавлений и 8 удалений

Просмотреть файл

@@ -25,3 +25,26 @@ func TestCompliancePost(t *testing.T) {
t.Fatal()
}
}
var cleanTests = []struct {
in string
expected string
}{
{"hello", "hello"},
{"=hello", "'=hello"},
{"+hello", "'+hello"},
{"-hello", "'-hello"},
{" =hello", "' =hello"},
{" +hello", "' +hello"},
{" -hello", "' -hello"},
{"\t -hello", "'\t -hello"},
}
func TestCleanComplianceStrings(t *testing.T) {
for _, tt := range cleanTests {
actual := cleanComplianceStrings(tt.in)
if actual != tt.expected {
t.Errorf("cleanComplianceStrings(%v): expected %v, actual %v", tt.in, tt.expected, actual)
}
}
}