Skip to content

Commit

Permalink
Restore opts.unformatted to initial value after tests are made.
Browse files Browse the repository at this point in the history
Relocated tests.
  • Loading branch information
JoseGoncalves committed Sep 12, 2014
1 parent 9abe378 commit a2f7f75
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions js/test/beautify-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -1788,7 +1788,22 @@ function run_beautifier_tests(test_obj, Urlencoded, js_beautify, html_beautify,
' }\n'+
'</style>');
// END tests for issue 453


var unformatted = opts.unformatted;
opts.unformatted = ['script', 'style'];
bth('<script id="javascriptTemplate" type="text/x-kendo-template">\n' +
' <ul>\n' +
' # for (var i = 0; i < data.length; i++) { #\n' +
' <li>#= data[i] #</li>\n' +
' # } #\n' +
' </ul>\n' +
'</script>');
bth('<style>\n' +
' body {background-color:lightgrey}\n' +
' h1 {color:blue}\n' +
'</style>');
opts.unformatted = unformatted;

// Tests that don't pass, but probably should.
// bth('<div><span>content</span></div>');

Expand Down Expand Up @@ -1978,19 +1993,6 @@ function run_beautifier_tests(test_obj, Urlencoded, js_beautify, html_beautify,
opts.preserve_newlines = false;
bth('<div>\n\tfoo\n</div>', '<div>foo</div>');

opts.unformatted = ['script', 'style'];
bth('<script id="javascriptTemplate" type="text/x-kendo-template">\n' +
' <ul>\n' +
' # for (var i = 0; i < data.length; i++) { #\n' +
' <li>#= data[i] #</li>\n' +
' # } #\n' +
' </ul>\n' +
'</script>');
bth('<style>\n' +
' body {background-color:lightgrey}\n' +
' h1 {color:blue}\n' +
'</style>');

opts.preserve_newlines = true;
bth('<div>\n\tfoo\n</div>');

Expand Down

0 comments on commit a2f7f75

Please sign in to comment.