improper constraint error when parsing a constraint with ranges and space separated parts
carolynvs opened this issue · comments
Carolyn Van Slyck commented
Before ee95afb the constraint 1.0.0 - 2.0.0 <=2.0.0
was parsed without error.
Now on the latest in master it fails with:
=== RUN TestConstraintsCheck
constraints_test.go:287: err: improper constraint: >= 1.0.0, <= 2.0.0<=2.0.0
Here are the test cases that I added to TestConstraintsCheck
and tried out before that commit and then again on master.
# Fails with improper constraint on master, works on earlier commits
{"1.0.0 - 2.0.0 <=2.0.0", "1.5.0", true},
# Passes for both
{"1.0.0 - 2.0.0, <=2.0.0", "1.5.0", true},
Seems like this is a regression in parsing constraints that use a range and also spaces to separate parts instead of a comma?
Matt Farina commented
Thanks for finding this and providing the tests. I have verified the issue.