aboutsummaryrefslogtreecommitdiffstats
path: root/python/tidy/servo_tidy_tests/test_tidy.py
diff options
context:
space:
mode:
authorMaciej Skrzypkowski <m.skrzypkows@samsung.com>2016-04-13 12:18:13 +0200
committeraskeing <askeing@gmail.com>2016-04-17 04:12:54 +0900
commit22d991d4e0b39dd0cb8d05215e181ac8ef957aab (patch)
tree7d35bef04486b34dd00afc5ca240808c244e00c7 /python/tidy/servo_tidy_tests/test_tidy.py
parent88c94f285eca66c62678b8f847d6a4f38ea53e3c (diff)
downloadservo-22d991d4e0b39dd0cb8d05215e181ac8ef957aab.tar.gz
servo-22d991d4e0b39dd0cb8d05215e181ac8ef957aab.zip
Test for check_spec function, for tidy.py #9152
Diffstat (limited to 'python/tidy/servo_tidy_tests/test_tidy.py')
-rw-r--r--python/tidy/servo_tidy_tests/test_tidy.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/python/tidy/servo_tidy_tests/test_tidy.py b/python/tidy/servo_tidy_tests/test_tidy.py
index d0e19daafb1..a183e6a798d 100644
--- a/python/tidy/servo_tidy_tests/test_tidy.py
+++ b/python/tidy/servo_tidy_tests/test_tidy.py
@@ -61,6 +61,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])