aboutsummaryrefslogtreecommitdiffstats
path: root/python/tidy/servo_tidy_tests/test_tidy.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/tidy/servo_tidy_tests/test_tidy.py')
-rw-r--r--python/tidy/servo_tidy_tests/test_tidy.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/python/tidy/servo_tidy_tests/test_tidy.py b/python/tidy/servo_tidy_tests/test_tidy.py
index 031e0873a56..1c26ba17b3b 100644
--- a/python/tidy/servo_tidy_tests/test_tidy.py
+++ b/python/tidy/servo_tidy_tests/test_tidy.py
@@ -75,6 +75,14 @@ class CheckTidiness(unittest.TestCase):
errors = tidy.collect_errors_for_files(iterFile('test.toml'), [tidy.check_toml], [])
self.assertEqual('found asterisk instead of minimum version number', errors.next()[2])
+ def test_modeline(self):
+ errors = tidy.collect_errors_for_files(iterFile('modeline.txt'), [], [tidy.check_modeline])
+ self.assertEqual('vi modeline present', errors.next()[2])
+ self.assertEqual('vi modeline present', errors.next()[2])
+ self.assertEqual('vi modeline present', errors.next()[2])
+ self.assertEqual('emacs file variables present', errors.next()[2])
+ self.assertEqual('emacs file variables present', errors.next()[2])
+
def do_tests():
suite = unittest.TestLoader().loadTestsFromTestCase(CheckTidiness)