Skip to content

Commit

Permalink
Split panic test case in two tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rubdos committed Sep 15, 2023
1 parent c100c6d commit ad848b9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 6 additions & 0 deletions src/parser/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,4 +292,10 @@ mod test {
let res = parser::parse(None, " 2 22#:");
assert!(res.is_err());
}

#[test]
fn advisory_1() {
let res = parser::parse(None, ".;phone-context=");
assert!(res.is_err(), "{res:?}");
}
}
5 changes: 2 additions & 3 deletions src/parser/rfc3966.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,8 @@ mod test {
}

#[test]
fn vuln0() {
// Just make sure these don't panic.
fn advisory_1() {
// Just make sure this does not panic.
let _ = rfc3966::phone_number(".;phone-context=");
let _ = crate::parse(None, ".;phone-context=");
}
}

0 comments on commit ad848b9

Please sign in to comment.