(t *testing.T)
| 180 | } |
| 181 | |
| 182 | func TestFixLoneBackslashesRegex(t *testing.T) { |
| 183 | // \d 不是合法 JSON 转义 → 修正 |
| 184 | in := `{"pattern":"\d+"}` |
| 185 | out := fixLoneBackslashes(in) |
| 186 | if !strings.Contains(out, `\\d+`) { |
| 187 | t.Fatalf("output = %q", out) |
| 188 | } |
| 189 | } |
| 190 | |
| 191 | func TestRobustJSONRepairsWindowsPath(t *testing.T) { |
| 192 | // Go json 接受 \f 解析为 form-feed 字符(0x0C),所以最终 path 会损失 "f" 字母 |
nothing calls this directly
no test coverage detected