nielsbasjes commented on code in PR #11770:
URL: https://github.com/apache/maven/pull/11770#discussion_r3652020043
##########
maven-core/src/test/java/org/apache/maven/toolchain/RequirementMatcherFactoryTest.java:
##########
@@ -50,11 +50,18 @@ public void testCreateExactMatcher() {
public void testCreateVersionMatcher() {
RequirementMatcher matcher;
matcher = RequirementMatcherFactory.createVersionMatcher("1.5.2");
- assertFalse(matcher.matches("1.5"));
- assertTrue(matcher.matches("1.5.2"));
+ assertTrue(matcher.matches("1")); // Major matches
+ assertTrue(matcher.matches("1.5")); // Major.Minor matches
+ assertTrue(matcher.matches("1.5.2")); // Full match
+ assertFalse(matcher.matches("1.6")); // Wrong minor
+ assertFalse(matcher.matches("2")); // Wrong major
Review Comment:
Yes, did that.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]