Skip to content

Commit

Permalink
Add test of wildcard next to another version req
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Feb 4, 2022
1 parent 43639e8 commit b2516c6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/test_version_req.rs
Original file line number Diff line number Diff line change
Expand Up @@ -413,3 +413,15 @@ fn test_leading_digit_in_pre_and_build() {
req(&format!("{} 1.2.3-1a-1a+1a-1a-1a", op));
}
}

#[test]
fn test_wildcard_and_another() {
let err = req_err("*, 0.20.0-any");
assert_to_string(err, "unexpected character after wildcard in version req");

let err = req_err("0.20.0-any, *");
assert_to_string(
err,
"unexpected character '*' while parsing major version number",
);
}

0 comments on commit b2516c6

Please sign in to comment.