package inliner import ( "fmt" "testing" ) // Simple rule inlining with two declarations func TestInliner(t *testing.T) { input := `
Inline me please!
` expectedOutput := `Inline me please!
` output, err := Inline(input) if err != nil { t.Fatal("Failed to inline html:", err) } if output != expectedOutput { t.Fatal(fmt.Sprintf("CSS inliner error\nExpected:\n\"%s\"\nGot:\n\"%s\"", expectedOutput, output)) } } // Already inlined style has more priority thanInline me please!