[libcxx] [test] Call create_directory_symlink when linking directories
authorMartin Storsjö <martin@martin.st>
Fri, 19 Feb 2021 22:10:56 +0000 (00:10 +0200)
committerMartin Storsjö <martin@martin.st>
Sat, 20 Feb 2021 22:25:54 +0000 (00:25 +0200)
This makes the symlinks work properly on windows.

A similar round of cleanup was done in
c41bda7f5fc26e4602a029646991d6a5c59cb365, but these tests were
added after that.

Differential Revision: https://reviews.llvm.org/D97089

libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory/create_directory.pass.cpp
libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory/create_directory_with_attributes.pass.cpp

index b5b1a8c..30dea61 100644 (file)
@@ -118,7 +118,7 @@ TEST_CASE(dest_is_symlink_to_dir)
 {
     scoped_test_env env;
     const path dir = env.create_dir("dir");
-    const path sym = env.create_symlink(dir, "sym_name");
+    const path sym = env.create_directory_symlink(dir, "sym_name");
     std::error_code ec = GetTestEC();
     TEST_CHECK(create_directory(sym, ec) == false);
     TEST_CHECK(!ec);
index 83f9c8d..cd436d9 100644 (file)
@@ -147,7 +147,7 @@ TEST_CASE(dest_is_symlink_to_unexisting) {
 TEST_CASE(dest_is_symlink_to_dir) {
   scoped_test_env env;
   const path dir = env.create_dir("dir");
-  const path sym = env.create_symlink(dir, "sym_name");
+  const path sym = env.create_directory_symlink(dir, "sym_name");
   const path attr_dir = env.create_dir("attr_dir");
   {
     std::error_code ec = GetTestEC();