mirror of
https://github.com/servo/servo.git
synced 2025-06-10 09:33:13 +00:00
Test for check_spec function, for tidy.py #9152
This commit is contained in:
parent
e8e354d5d3
commit
13847a1131
3 changed files with 18 additions and 3 deletions
|
@ -59,6 +59,11 @@ class CheckTidiness(unittest.TestCase):
|
|||
self.assertEqual('use &[T] instead of &Vec<T>', errors.next()[2])
|
||||
self.assertEqual('use &str instead of &String', errors.next()[2])
|
||||
|
||||
def test_spec_link(self):
|
||||
tidy.spec_base_path = "python/tidy_self_test/"
|
||||
errors = tidy.collect_errors_for_files(iterFile('speclink.rs'), [], [tidy.check_spec])
|
||||
self.assertEqual('method declared in webidl is missing a comment with a specification link', errors.next()[2])
|
||||
|
||||
def test_webidl(self):
|
||||
errors = tidy.collect_errors_for_files(iterFile('spec.webidl'), [tidy.check_webidl_spec], [])
|
||||
self.assertEqual('No specification link found.', errors.next()[2])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue