const CORRECT_OUTPUT_SRC_HREF_WITH_NAV = "<!DOCTYPE html><html><head><script src=\"http://two/foobar.js\"></script></head><body><nav><ul><li hugo-nav=\"section_0\"></li><li hugo-nav=\"section_1\" class=\"active\"></li></ul></nav><article>content <a href=\"http://two/foobar\">foobar</a>. Follow up</article></body></html>"
-var two_chain_tests = []test {
+var two_chain_tests = []test{
{H5_JS_CONTENT_ABS_URL_WITH_NAV, CORRECT_OUTPUT_SRC_HREF_WITH_NAV},
}
}
type test struct {
- content string
+ content string
expected string
}
-var abs_url_tests = []test {
- {H5_JS_CONTENT_DOUBLE_QUOTE, CORRECT_OUTPUT_SRC_HREF},
- {H5_JS_CONTENT_SINGLE_QUOTE, CORRECT_OUTPUT_SRC_HREF},
- {H5_JS_CONTENT_ABS_URL, H5_JS_CONTENT_ABS_URL},
- }
+var abs_url_tests = []test{
+ {H5_JS_CONTENT_DOUBLE_QUOTE, CORRECT_OUTPUT_SRC_HREF},
+ {H5_JS_CONTENT_SINGLE_QUOTE, CORRECT_OUTPUT_SRC_HREF},
+ {H5_JS_CONTENT_ABS_URL, H5_JS_CONTENT_ABS_URL},
+}
func apply(t *testing.T, tr Transformer, tests []test) {
for _, test := range tests {