1 extern crate quickcheck; 2 extern crate regex; 3 4 /* 5 * This test is a minimal version of <rofl_0> and <subdiff_0> 6 * 7 * Once this bug gets fixed, uncomment rofl_0 and subdiff_0 8 * (in `tests/crates_regex.rs`). 9 #[test] 10 fn word_boundary_backtracking_default_mismatch() { 11 use regex::internal::ExecBuilder; 12 13 let backtrack_re = ExecBuilder::new(r"\b") 14 .bounded_backtracking() 15 .build() 16 .map(|exec| exec.into_regex()) 17 .map_err(|err| format!("{}", err)) 18 .unwrap(); 19 20 let default_re = ExecBuilder::new(r"\b") 21 .build() 22 .map(|exec| exec.into_regex()) 23 .map_err(|err| format!("{}", err)) 24 .unwrap(); 25 26 let input = "䅅\\u{a0}"; 27 28 let fi1 = backtrack_re.find_iter(input); 29 let fi2 = default_re.find_iter(input); 30 for (m1, m2) in fi1.zip(fi2) { 31 assert_eq!(m1, m2); 32 } 33 } 34 */ 35 36 mod consistent; 37 38 mod crates_regex { 39 40 macro_rules! consistent { 41 ($test_name:ident, $regex_src:expr) => { 42 #[test] 43 fn $test_name() { 44 use super::consistent::backends_are_consistent; 45 46 if option_env!("RUST_REGEX_RANDOM_TEST").is_some() { 47 match backends_are_consistent($regex_src) { 48 Ok(_) => {} 49 Err(err) => panic!("{}", err), 50 } 51 } 52 } 53 }; 54 } 55 56 include!("crates_regex.rs"); 57 } 58