Skip to content

Commit

Permalink
Add test of digit after wildcard
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed May 25, 2021
1 parent a5850bb commit 969f20f
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 @@ -376,6 +376,18 @@ fn test_cargo3202() {
assert_to_string(r, "0.0.*");
}

#[test]
fn test_digit_after_wildcard() {
let err = req_err("*.1");
assert_to_string(err, "unexpected character after wildcard in version req");

let err = req_err("1.*.1");
assert_to_string(err, "unexpected character after wildcard in version req");

let err = req_err(">=1.*.1");
assert_to_string(err, "unexpected character after wildcard in version req");
}

#[test]
fn test_eq_hash() {
fn calculate_hash(value: impl Hash) -> u64 {
Expand Down

0 comments on commit 969f20f

Please sign in to comment.