This repository was archived by the owner on Nov 24, 2022. It is now read-only.
File tree Expand file tree Collapse file tree
modules/swagger-parser-v3/src/test/java/io/swagger/v3/parser/util Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -298,6 +298,10 @@ public void testPathJoin1() {
298298 public void testPathJoin2 () {
299299 assertEquals (RefUtils .buildUrl ("http://foo.bar.com/my/dir/file.yaml" , "../newFile.yaml" ), "http://foo.bar.com/my/newFile.yaml" );
300300 assertEquals (RefUtils .buildUrl ("http://foo.bar.com/my/dir/file.yaml" , "../../newFile.yaml" ), "http://foo.bar.com/newFile.yaml" );
301+ assertEquals (RefUtils .buildUrl ("http://foo.bar.com/my/dir/file.yaml" , "./newFile.yaml" ), "http://foo.bar.com/my/dir/newFile.yaml" );
302+ assertEquals (RefUtils .buildUrl ("http://foo.bar.com/my/dir/file.yaml" , "../second/newFile.yaml" ), "http://foo.bar.com/my/second/newFile.yaml" );
303+ assertEquals (RefUtils .buildUrl ("http://foo.bar.com/my/dir/file.yaml" , "../../otherDir/newFile.yaml" ), "http://foo.bar.com/otherDir/newFile.yaml" );
304+ assertEquals (RefUtils .buildUrl ("http://foo.bar.com/file.yaml" , "./newFile.yaml" ), "http://foo.bar.com/newFile.yaml" );
301305 assertEquals (RefUtils .buildUrl ("http://foo.bar.com/my/dir/file.yaml" , "/newFile.yaml" ), "http://foo.bar.com/newFile.yaml" );
302306 assertEquals (RefUtils .buildUrl ("http://foo.bar.com/my/dir/file.yaml" , "/my/newFile.yaml" ), "http://foo.bar.com/my/newFile.yaml" );
303307 }
You can’t perform that action at this time.
0 commit comments