Skip to content

Commit

Permalink
fix previous test fragement -> fragment and place an object opening t…
Browse files Browse the repository at this point in the history
…ag in the right spot
  • Loading branch information
jhaines committed Mar 16, 2017
1 parent 95da551 commit ba3221c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion js/test/generated/beautify-html-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ function run_html_tests(test_obj, Urlencoded, js_beautify, html_beautify, css_be
reset_options();
opts.wrap_attributes = 'force-aligned';
opts.indent_with_tabs = false;
bth(
test_fragment(
'<div a="1" b="2"><div>test</div></div>',
// -- output --
'<div a="1"\n' +
Expand Down
32 changes: 16 additions & 16 deletions test/data/html/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,20 +304,21 @@ exports.test_data = {
]
}],
tests: [{
fragement: true,
input: '<div a="1" b="2"><div>test</div></div>',
output: '<div a="1"\n b="2">\n <div>test</div>\n</div>'
},
{
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>'
}]
fragment: true,
input: '<div a="1" b="2"><div>test</div></div>',
output: '<div a="1"\n b="2">\n <div>test</div>\n</div>'
},
{
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",
description: "Wraps attributes inside of html tags",
Expand Down Expand Up @@ -775,8 +776,7 @@ exports.test_data = {
{ fragment: true, unchanged: '<p>\n <span>image: <img src="test.jpg" /></span><span>image: <img src="test.jpg" /></span>\n</p>' },
{ fragment: true, unchanged: '<p>\n <strong>image: <img src="test.jpg" /></strong><strong>image: <img src="test.jpg" /></strong>\n</p>' },
]
},
{
}, {
name: "File starting with comment",
description: "Unformatted tag behavior",
options: [],
Expand Down

0 comments on commit ba3221c

Please sign in to comment.