Test for another brace indenting case

Closes #262
This commit is contained in:
Liam Newman 2013-05-24 19:08:00 -07:00
parent 3f3fd7bf5c
commit 6210928940
2 changed files with 12 additions and 2 deletions

View File

@ -509,7 +509,8 @@ function run_beautifier_tests(test_obj, Urlencoded, js_beautify)
bt('var a = new function() {};');
bt('var a = new function a()\n {};');
test_fragment('new function');
bt("foo({\n 'a': 1\n},\n10);",
"foo(\n {\n 'a': 1\n },\n 10);");
opts.brace_style = 'collapse';
@ -546,6 +547,8 @@ function run_beautifier_tests(test_obj, Urlencoded, js_beautify)
bt('var a = new function() {};');
bt('var a = new function a() {};');
test_fragment('new function');
bt("foo({\n 'a': 1\n},\n10);",
"foo({\n 'a': 1\n },\n 10);");
opts.brace_style = "end-expand";
@ -582,6 +585,8 @@ function run_beautifier_tests(test_obj, Urlencoded, js_beautify)
bt('var a = new function() {};');
bt('var a = new function a() {};');
test_fragment('new function');
bt("foo({\n 'a': 1\n},\n10);",
"foo({\n 'a': 1\n },\n 10);");
opts.brace_style = 'collapse';

View File

@ -463,7 +463,8 @@ class TestJSBeautifier(unittest.TestCase):
bt('var a = new function() {};');
bt('var a = new function a()\n {};');
test_fragment('new function');
bt("foo({\n 'a': 1\n},\n10);",
"foo(\n {\n 'a': 1\n },\n 10);");
self.options.brace_style = 'collapse';
@ -500,6 +501,8 @@ class TestJSBeautifier(unittest.TestCase):
bt('var a = new function() {};');
bt('var a = new function a() {};');
test_fragment('new function');
bt("foo({\n 'a': 1\n},\n10);",
"foo({\n 'a': 1\n },\n 10);");
self.options.brace_style = "end-expand";
@ -536,6 +539,8 @@ class TestJSBeautifier(unittest.TestCase):
bt('var a = new function() {};');
bt('var a = new function a() {};');
test_fragment('new function');
bt("foo({\n 'a': 1\n},\n10);",
"foo({\n 'a': 1\n },\n 10);");
self.options.brace_style = 'collapse';