summaryrefslogtreecommitdiff
path: root/src/atom
diff options
context:
space:
mode:
Diffstat (limited to 'src/atom')
-rw-r--r--src/atom/parsers.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/atom/parsers.rs b/src/atom/parsers.rs
index d3eaf7a..e72c922 100644
--- a/src/atom/parsers.rs
+++ b/src/atom/parsers.rs
@@ -87,7 +87,7 @@ impl<'a> Parseable<'a, &'a str> for VersionSuffixes {
fn parser() -> Self::Parser {
VersionSuffix::parser()
.separated_by(tag("_"))
- .many()
+ .at_least(1)
.map(|suffixes| VersionSuffixes(suffixes))
}
}
@@ -486,4 +486,11 @@ mod test {
Cpv::parser().check_finished(it).unwrap();
}
+
+ #[test]
+ fn test_cpv_without_version_but_trailing_almost_version() {
+ let it = InputIter::new("dev-perl/mod-p-2.3_");
+
+ assert!(Cpv::parser().parse_finished(it).is_err());
+ }
}