(t *testing.T)
| 73 | } |
| 74 | |
| 75 | func TestPatchRejectsConfigWithoutOutbounds(t *testing.T) { |
| 76 | dir := t.TempDir() |
| 77 | p := filepath.Join(dir, "config.json") |
| 78 | if err := os.WriteFile(p, []byte(`{"log":{}}`), 0o644); err != nil { |
| 79 | t.Fatal(err) |
| 80 | } |
| 81 | if err := jsonProxyPatcher(p)("x", 1); err == nil { |
| 82 | t.Fatal("expected error") |
| 83 | } |
| 84 | } |
| 85 | |
| 86 | func TestSingBoxPatcher(t *testing.T) { |
| 87 | src := []byte(`{ |
nothing calls this directly
no test coverage detected