Skip to content

Commit

Permalink
Simpligfy crash test case to capture both rfc3966 failures
Browse files Browse the repository at this point in the history
  • Loading branch information
rubdos committed Jul 7, 2024
1 parent deefd99 commit 4384852
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
8 changes: 8 additions & 0 deletions tests/prop.proptest-regressions
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Seeds for failure cases proptest has generated in the past. It is
# automatically read and these particular cases re-run before any
# novel cases are generated.
#
# It is recommended to check this file in to source control so that
# everyone who runs the test benefits from these saved cases.
cc b429ed298cc9cdf5ac50cf41cc9bf7819a00f9a8f8f3dab37240e6f4c7f13c88 # shrinks to s = "-;phone-context=Σ"
cc d2e7fadc2dd4bf597d2ba7e5079c5b0e0d53beab84b45fba0b598226514aa3a3 # shrinks to s = "+3a;phone-context=AAa0a"
8 changes: 1 addition & 7 deletions tests/prop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,10 @@ use proptest::prelude::*;

proptest! {
#[test]
fn rfc3966_crash_test(s in "(tel:)?\\PC*;phone-context=\\PC*") {
fn rfc3966_crash_test(s in "(tel:)?.*;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);
Expand Down

0 comments on commit 4384852

Please sign in to comment.