(a, b map[string]string)
| 10 | ) |
| 11 | |
| 12 | func compareMaps(a, b map[string]string) error { |
| 13 | if len(a) != len(b) { |
| 14 | return fmt.Errorf("map length mismatch: %d != %d", len(a), len(b)) |
| 15 | } |
| 16 | for k, v := range a { |
| 17 | if b[k] != v { |
| 18 | return fmt.Errorf("value mismatch for key %s: %q != %q", k, v, b[k]) |
| 19 | } |
| 20 | } |
| 21 | return nil |
| 22 | } |
| 23 | |
| 24 | func TestParse1(t *testing.T) { |
| 25 | style := `background: url("example;with;semicolons.jpg"); color: red; margin-right: 5px; content: "hello;world";` |