Verifies: SYS-REQ-115 (zero-value Config remains strict) SYS-REQ-115:malformed_input:nominal reqproof:proptest:skip targeted witness/regression test; not a property-test subject
(t *testing.T)
| 90 | // SYS-REQ-115:malformed_input:nominal |
| 91 | // reqproof:proptest:skip targeted witness/regression test; not a property-test subject |
| 92 | func TestConfigStrictStillWorks(t *testing.T) { |
| 93 | if _, _, _, err := DefaultConfig.Get([]byte(`{'value':'data'}`), "value"); err == nil { |
| 94 | t.Fatal("DefaultConfig.Get accepted single-quoted JSON") |
| 95 | } |
| 96 | |
| 97 | if _, err := DefaultConfig.GetString([]byte("{\"value\":\"bad\\`escape\"}"), "value"); err == nil { |
| 98 | t.Fatal("DefaultConfig.GetString accepted an unknown escape") |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | // Verifies: SYS-REQ-115 (package-level API remains strict) |
| 103 | // SYS-REQ-115:malformed_input:nominal |