Skip to content

Commit

Permalink
More prop test crash tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rubdos committed Jul 7, 2024
1 parent a01a7f1 commit deefd99
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/prop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,27 @@ use phonenumber::parse;
use proptest::prelude::*;

proptest! {
#[test]
fn rfc3966_crash_test(s in "(tel:)?\\PC*;phone-context=\\PC*") {
let _ = parse(None, &s);
}

#[test]
fn rfc3966_crash_test_2(s in ".;phone-context=\\PC*") {
let _ = parse(None, &s);
}


#[test]
fn doesnt_crash(s in "\\PC*") {
let _ = parse(None, &s);
}

#[test]
fn doesnt_crash_2(s in "\\+\\PC*") {
let _ = parse(None, &s);
}

#[test]
fn parse_belgian_phonenumbers(s in "\\+32[0-9]{8,9}") {
let parsed = parse(None, &s).expect("valid Belgian number");
Expand Down

0 comments on commit deefd99

Please sign in to comment.