Skip to content

Commit

Permalink
Regression test for UTF-8 printable characters
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonpaulos committed Aug 15, 2024
1 parent 316221e commit 0ba3ad2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion util/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

func TestPrintableUTF8OrEmpty(t *testing.T) {
encodeArg := func(str string) string {
return base64.StdEncoding.EncodeToString([]byte("input"))
return base64.StdEncoding.EncodeToString([]byte(str))
}
tests := []struct {
name string
Expand All @@ -29,6 +29,11 @@ func TestPrintableUTF8OrEmpty(t *testing.T) {
"8J+qmSBNb25leSwgd2FudAo=",
"",
},
{
"Emoji",
encodeArg("🫙"),
"🫙",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down

0 comments on commit 0ba3ad2

Please sign in to comment.