diff options
Diffstat (limited to 'python/tidy/servo_tidy_tests')
-rw-r--r-- | python/tidy/servo_tidy_tests/rust_tidy.rs | 4 | ||||
-rw-r--r-- | python/tidy/servo_tidy_tests/shell_tidy.sh | 2 | ||||
-rw-r--r-- | python/tidy/servo_tidy_tests/test_tidy.py | 2 |
3 files changed, 7 insertions, 1 deletions
diff --git a/python/tidy/servo_tidy_tests/rust_tidy.rs b/python/tidy/servo_tidy_tests/rust_tidy.rs index 1bd0cfa3d27..abd533d5807 100644 --- a/python/tidy/servo_tidy_tests/rust_tidy.rs +++ b/python/tidy/servo_tidy_tests/rust_tidy.rs @@ -78,4 +78,8 @@ impl test { } else { let xif = 42 in { xif } // Should not trigger } + + let option = Some(3); + println!("{}", option.unwrap()); + panic!("What a way to end."); } diff --git a/python/tidy/servo_tidy_tests/shell_tidy.sh b/python/tidy/servo_tidy_tests/shell_tidy.sh index 2a887abf206..e38358fc3b6 100644 --- a/python/tidy/servo_tidy_tests/shell_tidy.sh +++ b/python/tidy/servo_tidy_tests/shell_tidy.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/bin/bash # # Tests tidy for shell scripts. diff --git a/python/tidy/servo_tidy_tests/test_tidy.py b/python/tidy/servo_tidy_tests/test_tidy.py index 3189250143a..6138320cc35 100644 --- a/python/tidy/servo_tidy_tests/test_tidy.py +++ b/python/tidy/servo_tidy_tests/test_tidy.py @@ -115,6 +115,8 @@ class CheckTidiness(unittest.TestCase): self.assertEqual('use &T instead of &DomRoot<T>', next(errors)[2]) self.assertEqual('encountered function signature with -> ()', next(errors)[2]) self.assertEqual('operators should go at the end of the first line', next(errors)[2]) + self.assertEqual('unwrap() or panic!() found in code which should not panic.', next(errors)[2]) + self.assertEqual('unwrap() or panic!() found in code which should not panic.', next(errors)[2]) self.assertNoMoreErrors(errors) feature_errors = tidy.collect_errors_for_files(iterFile('lib.rs'), [], [tidy.check_rust], print_text=False) |