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

refactor: version tree parsing with nom #206

Merged
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
Prev Previous commit
test: also test epoch is integer
baszalmstra committed Jun 6, 2023
commit 0ddc334ff989a8452b310d96e6ad3bd4dd406fde
6 changes: 6 additions & 0 deletions crates/rattler_conda_types/src/version_spec/version_tree.rs
Original file line number Diff line number Diff line change
@@ -357,6 +357,12 @@ mod tests {
parse_version_epoch::<Err>("1!1.0b2.post345.dev456"),
Ok(("1.0b2.post345.dev456", 1))
);

// Epochs must be integers
assert!(
parse_version_epoch::<Err>("12.23!1").is_err(),
"epochs should only be integers"
);
}

#[test]