aboutsummaryrefslogtreecommitdiffstats
path: root/python/tidy/servo_tidy_tests/test_tidy.py
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2016-12-16 11:36:47 -0500
committerJosh Matthews <josh@joshmatthews.net>2016-12-16 11:52:45 -0500
commit14d8ae2478356014a4ab10fbed1b11b3616475a4 (patch)
tree92932abd86ec4af78cbcc3f8414ac71bb4d6115a /python/tidy/servo_tidy_tests/test_tidy.py
parenta74cbbeb1a112dda2a18327ee0c9d4caad2ec277 (diff)
downloadservo-14d8ae2478356014a4ab10fbed1b11b3616475a4.tar.gz
servo-14d8ae2478356014a4ab10fbed1b11b3616475a4.zip
Add a tidy check for problematic match cases in script_thread.rs
Diffstat (limited to 'python/tidy/servo_tidy_tests/test_tidy.py')
-rw-r--r--python/tidy/servo_tidy_tests/test_tidy.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/python/tidy/servo_tidy_tests/test_tidy.py b/python/tidy/servo_tidy_tests/test_tidy.py
index c6fe8bd83fa..265c485a106 100644
--- a/python/tidy/servo_tidy_tests/test_tidy.py
+++ b/python/tidy/servo_tidy_tests/test_tidy.py
@@ -141,6 +141,12 @@ class CheckTidiness(unittest.TestCase):
self.assertEqual('method declared in webidl is missing a comment with a specification link', errors.next()[2])
self.assertNoMoreErrors(errors)
+ def test_script_thread(self):
+ errors = tidy.collect_errors_for_files(iterFile('script_thread.rs'), [], [tidy.check_rust], print_text=False)
+ self.assertEqual('use a separate variable for the match expression', errors.next()[2])
+ self.assertEqual('use a separate variable for the match expression', errors.next()[2])
+ self.assertNoMoreErrors(errors)
+
def test_webidl(self):
errors = tidy.collect_errors_for_files(iterFile('spec.webidl'), [tidy.check_webidl_spec], [], print_text=False)
self.assertEqual('No specification link found.', errors.next()[2])