diff --git a/src/SystemPaths.cc b/src/SystemPaths.cc index 725cc7a25..81ced0ff2 100644 --- a/src/SystemPaths.cc +++ b/src/SystemPaths.cc @@ -313,7 +313,6 @@ std::string SystemPaths::FindFileURI(const std::string &_uri) const } const auto uri = ignition::common::URI(_uri); - std::cout << "Debug URI[" << uri.Str() << "]\n"; return this->FindFileURI(uri); } diff --git a/src/SystemPaths_TEST.cc b/src/SystemPaths_TEST.cc index f695c0750..f87cc8f5d 100644 --- a/src/SystemPaths_TEST.cc +++ b/src/SystemPaths_TEST.cc @@ -127,7 +127,7 @@ TEST_F(SystemPathsFixture, FileSystemPaths) common::setenv(kFilePath, SystemPathsJoin(filePaths)); paths.SetFilePathEnv(kFilePath); EXPECT_EQ(file1, paths.FindFile("test_f1")) << paths.FindFile("test_f1"); - EXPECT_EQ(file1, paths.FindFile("model://test_f1")); + EXPECT_EQ(file1, paths.FindFile("model:test_f1")); } ///////////////////////////////////////////////// @@ -243,7 +243,7 @@ TEST_F(SystemPathsFixture, FindFileURI) }; EXPECT_EQ("", sp.FindFileURI("robot://test_f1")); - EXPECT_EQ("", sp.FindFileURI("osrf://test_f2")); + EXPECT_EQ("", sp.FindFileURI("osrf:test_f2")); // We still want to test the deprecated function until it is removed. #ifndef _WIN32 @@ -256,7 +256,7 @@ TEST_F(SystemPathsFixture, FindFileURI) #endif EXPECT_EQ(file1, sp.FindFileURI("robot://test_f1")); - EXPECT_EQ("", sp.FindFileURI("osrf://test_f2")); + EXPECT_EQ("", sp.FindFileURI("osrf:test_f2")); sp.AddFindFileURICallback(osrfCb); EXPECT_EQ(file1, sp.FindFileURI("robot://test_f1")); @@ -266,21 +266,21 @@ TEST_F(SystemPathsFixture, FindFileURI) // second handler for the same protocol is available sp.AddFindFileURICallback(robot2Cb); EXPECT_EQ(file1, sp.FindFileURI("robot://test_f1")); - EXPECT_EQ(file2, sp.FindFileURI("osrf://test_f2")); + EXPECT_EQ(file2, sp.FindFileURI("osrf:test_f2")); // URI + env var common::setenv(kFilePath, dir1); sp.SetFilePathEnv(kFilePath); EXPECT_EQ(kFilePath, sp.FilePathEnv()); - EXPECT_EQ(file1, sp.FindFileURI("anything://test_f1")); - EXPECT_NE(file2, sp.FindFileURI("anything://test_f2")); + EXPECT_EQ(file1, sp.FindFileURI("anything:test_f1")); + EXPECT_NE(file2, sp.FindFileURI("anything:test_f2")); std::string newEnv{"IGN_NEW_FILE_PATH"}; common::setenv(newEnv, dir2); sp.SetFilePathEnv(newEnv); EXPECT_EQ(newEnv, sp.FilePathEnv()); - EXPECT_NE(file1, sp.FindFileURI("anything://test_f1")); - EXPECT_EQ(file2, sp.FindFileURI("anything://test_f2")); + EXPECT_NE(file1, sp.FindFileURI("anything:test_f1")); + EXPECT_EQ(file2, sp.FindFileURI("anything:test_f2")); } ////////////////////////////////////////////////// diff --git a/src/Util_TEST.cc b/src/Util_TEST.cc index 2b41184e8..6b827756f 100644 --- a/src/Util_TEST.cc +++ b/src/Util_TEST.cc @@ -298,7 +298,7 @@ TEST(Util_TEST, findFile) "test_f1"), true)); // Relative prefixed by file:// - EXPECT_EQ(file1, ignition::common::findFile("file://test_dir1/test_f1")); + EXPECT_EQ(file1, ignition::common::findFile("file:test_dir1/test_f1")); // Custom callback #ifndef _WIN32