Skip to content

Commit fb82382

Browse files
authored
Regression test for UTF-8 printable characters (#1624)
1 parent 316221e commit fb82382

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

util/util_test.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212

1313
func TestPrintableUTF8OrEmpty(t *testing.T) {
1414
encodeArg := func(str string) string {
15-
return base64.StdEncoding.EncodeToString([]byte("input"))
15+
return base64.StdEncoding.EncodeToString([]byte(str))
1616
}
1717
tests := []struct {
1818
name string
@@ -29,6 +29,11 @@ func TestPrintableUTF8OrEmpty(t *testing.T) {
2929
"8J+qmSBNb25leSwgd2FudAo=",
3030
"",
3131
},
32+
{
33+
"Emoji",
34+
encodeArg("🫙"),
35+
"🫙",
36+
},
3237
}
3338
for _, tt := range tests {
3439
t.Run(tt.name, func(t *testing.T) {

0 commit comments

Comments
 (0)