MCPcopy Create free account
hub / github.com/buger/jsonparser / TestRemoval1_Unescape_LoopExitsOnSingleEscape

Function TestRemoval1_Unescape_LoopExitsOnSingleEscape

dead_code_audit_test.go:39–47  ·  view source on GitHub ↗

Verifies: SYS-REQ-014 [boundary]

(t *testing.T)

Source from the content-addressed store, hash-verified

37
38// Verifies: SYS-REQ-014 [boundary]
39func TestRemoval1_Unescape_LoopExitsOnSingleEscape(t *testing.T) {
40 out, err := Unescape([]byte(`hello\nworld`), make([]byte, 64))
41 if err != nil {
42 t.Fatalf("unexpected error: %v", err)
43 }
44 if string(out) != "hello\nworld" {
45 t.Fatalf("unexpected result: %q", out)
46 }
47}
48
49// Verifies: SYS-REQ-014 [boundary]
50func TestRemoval1_Unescape_LoopExitsOnTrailingEscape(t *testing.T) {

Callers

nothing calls this directly

Calls 1

UnescapeFunction · 0.85

Tested by

no test coverage detected