From a2f7f751643b5e4637369477f91f7e08fa2489da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Miguel=20Gon=C3=A7alves?= Date: Fri, 12 Sep 2014 18:44:00 +0100 Subject: [PATCH] Restore opts.unformatted to initial value after tests are made. Relocated tests. --- js/test/beautify-tests.js | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/js/test/beautify-tests.js b/js/test/beautify-tests.js index 65d61924b..ed9164f00 100755 --- a/js/test/beautify-tests.js +++ b/js/test/beautify-tests.js @@ -1788,7 +1788,22 @@ function run_beautifier_tests(test_obj, Urlencoded, js_beautify, html_beautify, ' }\n'+ ''); // END tests for issue 453 - + + var unformatted = opts.unformatted; + opts.unformatted = ['script', 'style']; + bth(''); + bth(''); + opts.unformatted = unformatted; + // Tests that don't pass, but probably should. // bth('
content
'); @@ -1978,19 +1993,6 @@ function run_beautifier_tests(test_obj, Urlencoded, js_beautify, html_beautify, opts.preserve_newlines = false; bth('
\n\tfoo\n
', '
foo
'); - opts.unformatted = ['script', 'style']; - bth(''); - bth(''); - opts.preserve_newlines = true; bth('
\n\tfoo\n
');