(t *testing.T)
| 33 | } |
| 34 | |
| 35 | func TestWriteYAML(t *testing.T) { |
| 36 | var buf bytes.Buffer |
| 37 | data := map[string]string{"key": "value"} |
| 38 | |
| 39 | if err := WriteYAML(&buf, data); err != nil { |
| 40 | t.Fatalf("WriteYAML failed: %v", err) |
| 41 | } |
| 42 | |
| 43 | // Verify it's valid YAML |
| 44 | var parsed map[string]string |
| 45 | if err := yaml.Unmarshal(buf.Bytes(), &parsed); err != nil { |
| 46 | t.Fatalf("output is not valid YAML: %v", err) |
| 47 | } |
| 48 | if parsed["key"] != "value" { |
| 49 | t.Errorf("expected key=value, got key=%s", parsed["key"]) |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | func TestValidateFormat(t *testing.T) { |
| 54 | tests := []struct { |
nothing calls this directly
no test coverage detected