Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ParseMatchSpecError and ParseMatchSpecError tests #434

Merged
merged 6 commits into from
Dec 10, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add test_special_characters_matches for StringMatcher::from_str
  • Loading branch information
Johnwillliam committed Dec 8, 2023
commit 7dba9d4eeafb6f9fdf30a62f849dc80bb8c98070
8 changes: 8 additions & 0 deletions crates/rattler_conda_types/src/match_spec/matcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,4 +151,12 @@ mod tests {
.unwrap()
.matches("foobar"));
}

#[test]
fn test_special_characters_matches() {
let special_characters = "~!@#$%^&*()_-+={}[]|;:'<>,.?/";
for special_character in special_characters.chars() {
assert!(StringMatcher::from_str(&special_character.to_string()).unwrap().matches(&special_character.to_string()));
}
}
}