Verifies: SYS-REQ-014 [boundary] — lone low surrogate → U+FFFD.
(t *testing.T)
| 255 | |
| 256 | // Verifies: SYS-REQ-014 [boundary] — lone low surrogate → U+FFFD. |
| 257 | func TestUnescapeLoneLowSurrogate(t *testing.T) { |
| 258 | out, err := Unescape([]byte(`\uDC00`), nil) |
| 259 | if err != nil { |
| 260 | t.Fatalf("Unescape(`\\uDC00`) returned error %v; expected U+FFFD substitution", err) |
| 261 | } |
| 262 | if got := string(out); got != replacementChar { |
| 263 | t.Errorf("Unescape(`\\uDC00`) = %q; expected %q (U+FFFD)", got, replacementChar) |
| 264 | } |
| 265 | } |
| 266 | |
| 267 | // Verifies: SYS-REQ-014 [boundary] — high surrogate followed by a "\u" escape |
| 268 | // that is NOT a low surrogate (here a BMP codepoint U+0041 'A') → U+FFFD + 'A'. |
nothing calls this directly
no test coverage detected