vibhatha commented on code in PR #14132:
URL: https://github.com/apache/arrow/pull/14132#discussion_r972505830


##########
cpp/src/arrow/filesystem/filesystem_test.cc:
##########
@@ -308,28 +308,27 @@ TEST(InternalUtil, GlobFiles) {
     ASSERT_EQ(actual, expected);
   };
 
-  ASSERT_OK(fs->CreateDir("A/CD"));
-  ASSERT_OK(fs->CreateDir("AB/CD"));
-  ASSERT_OK(fs->CreateDir("AB/CD/ab"));
-  CreateFile(fs.get(), "A/CD/ab.txt", "data");
-  CreateFile(fs.get(), "AB/CD/a.txt", "data");
-  CreateFile(fs.get(), "AB/CD/abc.txt", "data");
-  CreateFile(fs.get(), "AB/CD/ab/c.txt", "data");
+  ASSERT_OK(fs->CreateDir(base_dir + "A/CD"));
+  ASSERT_OK(fs->CreateDir(base_dir + "AB/CD"));
+  ASSERT_OK(fs->CreateDir(base_dir + "AB/CD/ab"));
+  CreateFile(fs.get(), base_dir + "A/CD/ab.txt", "data");
+  CreateFile(fs.get(), base_dir + "AB/CD/a.txt", "data");
+  CreateFile(fs.get(), base_dir + "AB/CD/abc.txt", "data");
+  CreateFile(fs.get(), base_dir + "AB/CD/ab/c.txt", "data");
 
   FileInfoVector infos;
-  ASSERT_OK_AND_ASSIGN(infos, GlobFiles(fs, "A*/CD/?b*.txt"));
+  ASSERT_OK_AND_ASSIGN(infos, GlobFiles(fs, base_dir + "A*/CD/?b*.txt"));
   ASSERT_EQ(infos.size(), 2);
-  check_entries(infos, {"A/CD/ab.txt", "AB/CD/abc.txt"});
+  check_entries(infos, {base_dir + "A/CD/ab.txt", base_dir + "AB/CD/abc.txt"});
 
-  // Leading slash is optional but doesn't change behavior
-  ASSERT_OK_AND_ASSIGN(infos, GlobFiles(fs, "/A*/CD/?b*.txt"));
-  ASSERT_EQ(infos.size(), 2);
-  check_entries(infos, {"A/CD/ab.txt", "AB/CD/abc.txt"});

Review Comment:
   cc @westonpace 
   I removed this and updated the test case to function with and without 
leading `/`. Is this okay?



-- 
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]

Reply via email to