Skip to content
Myr

Add tests for regex_helper

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by sharkdp · committed by David Peter · parent 809fd8f · Browse files · 1 file+17 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+17 added−0 removed

  • other:+17 added−0 removed

1 file+17 added−0 removed

modified:src/regex_helper.rs+17 added
31 unmodified lines
32 }33 _ => false,34 }35}3637#[test]38fn pattern_has_uppercase_char_simple() {39 assert!(pattern_has_uppercase_char("A"));40 assert!(pattern_has_uppercase_char("foo.EXE"));4142 assert!(!pattern_has_uppercase_char("a"));43 assert!(!pattern_has_uppercase_char("foo.exe123"));44}4546#[test]47fn pattern_has_uppercase_char_advanced() {48 assert!(pattern_has_uppercase_char("foo.[a-zA-Z]"));4950 assert!(!pattern_has_uppercase_char(r"\Acargo"));51 assert!(!pattern_has_uppercase_char(r"carg\x6F"));52}