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

Function TestBackslashAtEnd

deep_spec_test.go:659–664  ·  view source on GitHub ↗

Verifies: SYS-REQ-063 [malformed] Backslash at end of string shall return MalformedValueError.

(t *testing.T)

Source from the content-addressed store, hash-verified

657// Verifies: SYS-REQ-063 [malformed]
658// Backslash at end of string shall return MalformedValueError.
659func TestBackslashAtEnd(t *testing.T) {
660 _, err := ParseString([]byte(`\`))
661 if !errors.Is(err, MalformedValueError) {
662 t.Fatalf("ParseString(lone backslash) error = %v, want %v", err, MalformedValueError)
663 }
664}
665
666// =============================================================================
667// GetString edge cases (SYS-REQ-071, SYS-REQ-072, SYS-REQ-073, SYS-REQ-074)

Callers

nothing calls this directly

Calls 1

ParseStringFunction · 0.85

Tested by

no test coverage detected