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

Function TestAppendString

append_test.go:59–67  ·  view source on GitHub ↗

Verifies: SYS-REQ-110 (Set/array append) reqproof:proptest:skip

(t *testing.T)

Source from the content-addressed store, hash-verified

57// Verifies: SYS-REQ-110 (Set/array append)
58// reqproof:proptest:skip
59func TestAppendString(t *testing.T) {
60 got, err := Append([]byte(`{"tags":["a"]}`), Escape("b"), "tags")
61 if err != nil {
62 t.Fatalf("Append returned error: %v", err)
63 }
64 if want := `{"tags":["a","b"]}`; string(got) != want {
65 t.Fatalf("Append result = %s, want %s", got, want)
66 }
67}
68
69// Verifies: SYS-REQ-110 (Set/array append)
70// reqproof:proptest:skip

Callers

nothing calls this directly

Calls 2

AppendFunction · 0.85
EscapeFunction · 0.85

Tested by

no test coverage detected