MCPcopy Create free account
hub / github.com/cli/cli / TestStripControl_dropsC0KeepsWhitespace

Function TestStripControl_dropsC0KeepsWhitespace

pkg/iostreams/untrusted_test.go:49–51  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

47}
48
49func TestStripControl_dropsC0KeepsWhitespace(t *testing.T) {
50 assert.Equal(t, "abc\td\ne", stripControl("a\x1bb\x07c\td\ne"))
51}
52
53// The showcase property: an Untrusted struct field is populated by
54// json.Unmarshal with provenance intact, so printing it later sanitizes even

Callers

nothing calls this directly

Calls 2

stripControlFunction · 0.85
EqualMethod · 0.80

Tested by

no test coverage detected