package main import "testing" func TestUnxhtmlifyString(t *testing.T) { var tests = []struct { input, expected string }{ { "
", "
" }, { "Bender / Flexo", "Bender / Flexo" }, { "\"Parabox\"/", "\"Parabox\"" }, { "some-class-name\" />", "some-class-name\">" }, { "/>", ">" }, { " />", " >" }, } for _, c := range tests { result := unxhtmlify_line(c.input) if result != c.expected { t.Errorf("unminify_line(%q) == %q, want %q", c.input, result, c.expected) } } }