mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Check for blank line after shebang and grab actual comment block instead of hard-coded one
This commit is contained in:
parent
48ace17b54
commit
9a3b61abe1
4 changed files with 22 additions and 8 deletions
|
@ -48,6 +48,11 @@ class CheckTidiness(unittest.TestCase):
|
|||
self.assertEqual('incorrect license', errors.next()[2])
|
||||
self.assertNoMoreErrors(errors)
|
||||
|
||||
def test_shebang_license(self):
|
||||
errors = tidy.collect_errors_for_files(iterFile('shebang_license.py'), [], [tidy.check_license], print_text=False)
|
||||
self.assertEqual('missing blank line after shebang', errors.next()[2])
|
||||
self.assertNoMoreErrors(errors)
|
||||
|
||||
def test_shell(self):
|
||||
errors = tidy.collect_errors_for_files(iterFile('shell_tidy.sh'), [], [tidy.check_shell], print_text=False)
|
||||
self.assertEqual('script does not have shebang "#!/usr/bin/env bash"', errors.next()[2])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue