You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2019/07/02 17:05:06 UTC
[GitHub] [maven] rfscholte commented on a change in pull request #264:
[MNG-6535] Improve test coverage of UrlNormalizer.
rfscholte commented on a change in pull request #264: [MNG-6535] Improve test coverage of UrlNormalizer.
URL: https://github.com/apache/maven/pull/264#discussion_r299588903
##########
File path: maven-model-builder/src/test/java/org/apache/maven/model/path/DefaultUrlNormalizerTest.java
##########
@@ -82,4 +82,8 @@ public void testPreservationOfDoubleSlashes()
normalize( "[fetch=]http://server.org/[push=]ssh://server.org/" ) );
}
+ public void testNormalizeInputWithNoParentDirectoriesToAscendTo()
+ {
+ assertEquals("a/../", normalize("a/../"));
+ }
Review comment:
Maybe the implementation is wrong, but comparing this with Path this is the result:
assertEquals( "a/../", Paths.get("a/../").normalize().toString() ); // fails
assertEquals( "", Paths.get("a/../").normalize().toString() ); // succeeds
The Path behavior is also what I would expect.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services