aboutsummaryrefslogtreecommitdiffstats
path: root/python/tidy/servo_tidy_tests
diff options
context:
space:
mode:
Diffstat (limited to 'python/tidy/servo_tidy_tests')
-rw-r--r--python/tidy/servo_tidy_tests/apache2_license.rs5
-rw-r--r--python/tidy/servo_tidy_tests/test_tidy.py4
2 files changed, 9 insertions, 0 deletions
diff --git a/python/tidy/servo_tidy_tests/apache2_license.rs b/python/tidy/servo_tidy_tests/apache2_license.rs
new file mode 100644
index 00000000000..c9fed89cf73
--- /dev/null
+++ b/python/tidy/servo_tidy_tests/apache2_license.rs
@@ -0,0 +1,5 @@
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
diff --git a/python/tidy/servo_tidy_tests/test_tidy.py b/python/tidy/servo_tidy_tests/test_tidy.py
index 92b304a5c1a..888c0faf693 100644
--- a/python/tidy/servo_tidy_tests/test_tidy.py
+++ b/python/tidy/servo_tidy_tests/test_tidy.py
@@ -58,6 +58,10 @@ class CheckTidiness(unittest.TestCase):
self.assertEqual('script should use `[[` instead of `[` for conditional testing', errors.next()[2])
self.assertNoMoreErrors(errors)
+ def test_apache2_incomplete(self):
+ errors = tidy.collect_errors_for_files(iterFile('apache2_license.rs'), [], [tidy.check_license])
+ self.assertEqual('incorrect license', errors.next()[2])
+
def test_rust(self):
errors = tidy.collect_errors_for_files(iterFile('rust_tidy.rs'), [], [tidy.check_rust], print_text=False)
self.assertEqual('use statement spans multiple lines', errors.next()[2])