MCPcopy Create free account
hub / github.com/akalin/gopar / TestDecodeASCIIStringNullByte

Function TestDecodeASCIIStringNullByte

par2/string_test.go:22–25  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

20}
21
22func TestDecodeASCIIStringNullByte(t *testing.T) {
23 s := "hello\x00world"
24 require.Equal(t, "hello", decodeNullPaddedASCIIString([]byte(s)))
25}
26
27func TestDecodeNonASCIIString(t *testing.T) {
28 s := "hello\x80world"

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected