add a span attribute wrapping test, too

This commit is contained in:
Joshua Haines 2017-03-16 14:52:13 +10:00
parent 0d3d6daaef
commit 95da55112d
2 changed files with 15 additions and 0 deletions

View File

@ -395,6 +395,16 @@ function run_html_tests(test_obj, Urlencoded, js_beautify, html_beautify, css_be
' target="_blank"><img src="test.jpg" /></a><a href="/test/"\n' +
' target="_blank"><img src="test.jpg" /></a>\n' +
'</p>');
test_fragment(
'<p>\n' +
' <span data-not-a-href="/test/" data-totally-not-a-target="_blank"><img src="test.jpg" /></span><span data-not-a-href="/test/" data-totally-not-a-target="_blank"><img src="test.jpg" /></span>\n' +
'</p>',
// -- output --
'<p>\n' +
' <span data-not-a-href="/test/"\n' +
' data-totally-not-a-target="_blank"><img src="test.jpg" /></span><span data-not-a-href="/test/"\n' +
' data-totally-not-a-target="_blank"><img src="test.jpg" /></span>\n' +
'</p>');
//============================================================

View File

@ -312,6 +312,11 @@ exports.test_data = {
fragment: true,
input: '<p>\n <a href="/test/" target="_blank"><img src="test.jpg" /></a><a href="/test/" target="_blank"><img src="test.jpg" /></a>\n</p>',
output: '<p>\n <a href="/test/"\n target="_blank"><img src="test.jpg" /></a><a href="/test/"\n target="_blank"><img src="test.jpg" /></a>\n</p>'
},
{
fragment: true,
input: '<p>\n <span data-not-a-href="/test/" data-totally-not-a-target="_blank"><img src="test.jpg" /></span><span data-not-a-href="/test/" data-totally-not-a-target="_blank"><img src="test.jpg" /></span>\n</p>',
output: '<p>\n <span data-not-a-href="/test/"\n data-totally-not-a-target="_blank"><img src="test.jpg" /></span><span data-not-a-href="/test/"\n data-totally-not-a-target="_blank"><img src="test.jpg" /></span>\n</p>'
}]
}, {
name: "Attribute Wrap",