Skip to content

Commit

Permalink
Semicolon-less declaration verification
Browse files Browse the repository at this point in the history
Closes #323
  • Loading branch information
bitwiseman committed Apr 5, 2014
1 parent 41d012e commit c30247f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions js/test/beautify-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,11 @@ function run_beautifier_tests(test_obj, Urlencoded, js_beautify, html_beautify,
bt('var a = function() {\n func1()\n}');
bt('var a = function() {\n func1()\n}\nvar b = function() {\n func2()\n}');

// code with and without semicolons
bt( 'var whatever = require("whatever");\nfunction() {\n a = 6;\n}',
'var whatever = require("whatever");\n\nfunction() {\n a = 6;\n}');
bt( 'var whatever = require("whatever")\nfunction() {\n a = 6\n}',
'var whatever = require("whatever")\n\nfunction() {\n a = 6\n}');


opts.jslint_happy = true;
Expand Down
6 changes: 5 additions & 1 deletion python/jsbeautifier/tests/testjsbeautifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,11 @@ def test_beautifier(self):
bt('var a = function() {\n func1()\n}');
bt('var a = function() {\n func1()\n}\nvar b = function() {\n func2()\n}');


# code with and without semicolons
bt( 'var whatever = require("whatever");\nfunction() {\n a = 6;\n}',
'var whatever = require("whatever");\n\nfunction() {\n a = 6;\n}');
bt( 'var whatever = require("whatever")\nfunction() {\n a = 6\n}',
'var whatever = require("whatever")\n\nfunction() {\n a = 6\n}');


self.options.jslint_happy = True
Expand Down

0 comments on commit c30247f

Please sign in to comment.