(t *testing.T)
| 161 | } |
| 162 | |
| 163 | func TestGRPCPercentEncoding(t *testing.T) { |
| 164 | t.Parallel() |
| 165 | roundtrip := func(input string) { |
| 166 | assert.True(t, utf8.ValidString(input), assert.Sprintf("input invalid UTF-8")) |
| 167 | encoded := grpcPercentEncode(input) |
| 168 | t.Logf("%q encoded as %q", input, encoded) |
| 169 | decoded, err := grpcPercentDecode(encoded) |
| 170 | assert.Nil(t, err) |
| 171 | assert.Equal(t, decoded, input) |
| 172 | } |
| 173 | |
| 174 | roundtrip("foo") |
| 175 | roundtrip("foo bar") |
| 176 | roundtrip(`foo%bar`) |
| 177 | roundtrip("fiancée") |
| 178 | } |
| 179 | |
| 180 | func TestGRPCWebTrailerMarshalling(t *testing.T) { |
| 181 | t.Parallel() |
nothing calls this directly
no test coverage detected