diff options
Diffstat (limited to 'python/tidy/servo_tidy_tests/test_tidy.py')
-rw-r--r-- | python/tidy/servo_tidy_tests/test_tidy.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/python/tidy/servo_tidy_tests/test_tidy.py b/python/tidy/servo_tidy_tests/test_tidy.py index bb1cb8ce61c..c8751ea59c4 100644 --- a/python/tidy/servo_tidy_tests/test_tidy.py +++ b/python/tidy/servo_tidy_tests/test_tidy.py @@ -23,6 +23,13 @@ class CheckTidiness(unittest.TestCase): with self.assertRaises(StopIteration): errors.next() + def test_tidy_config(self): + errors = tidy.check_config_file(os.path.join(base_path, 'servo-tidy.toml')) + self.assertEqual('invalid config key \'key-outside\'', errors.next()[2]) + self.assertEqual('invalid config key \'wrong-key\'', errors.next()[2]) + self.assertEqual('invalid config table [wrong]', errors.next()[2]) + self.assertNoMoreErrors(errors) + def test_spaces_correctnes(self): errors = tidy.collect_errors_for_files(iterFile('wrong_space.rs'), [], [tidy.check_by_line], print_text=False) self.assertEqual('trailing whitespace', errors.next()[2]) |