diff options
Diffstat (limited to 'src/doc/rustc-dev-guide/ci')
| -rw-r--r-- | src/doc/rustc-dev-guide/ci/date-check/src/main.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/doc/rustc-dev-guide/ci/date-check/src/main.rs b/src/doc/rustc-dev-guide/ci/date-check/src/main.rs index d78b430b5c7..bbea2bf38d9 100644 --- a/src/doc/rustc-dev-guide/ci/date-check/src/main.rs +++ b/src/doc/rustc-dev-guide/ci/date-check/src/main.rs @@ -39,7 +39,7 @@ fn make_date_regex() -> Regex { Regex::new( r"(?x) # insignificant whitespace mode <!--\s* - date:\s* + [dD]ate:\s* (?P<y>\d{4}) # year - (?P<m>\d{2}) # month @@ -187,6 +187,12 @@ mod tests { } #[test] + fn test_date_regex_capitalized() { + let regex = make_date_regex(); + assert!(regex.is_match("foo <!-- Date: 2021-08 --> bar")); + } + + #[test] fn test_collect_dates_from_file() { let text = "Test1\n<!-- date: 2021-01 -->\nTest2\nFoo<!-- date: 2021-02 \ -->\nTest3\nTest4\nFoo<!-- date: 2021-03 -->Bar\n<!-- date: 2021-04 \ |
