-// Copyright (C) 2017-2021 Free Software Foundation, Inc.
+// Copyright (C) 2017-2024 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// { dg-do run { target c++17 } }
// { dg-require-filesystem-ts "" }
-// { dg-xfail-if "symlinks not supported" { *-*-mingw* } }
#include <filesystem>
#include <testsuite_hooks.h>
fs::file_status st2 = fs::symlink_status(dot);
VERIFY( st2.type() == fs::file_type::directory );
+#ifndef NO_SYMLINKS
fs::path link = __gnu_test::nonexistent_path();
create_directory_symlink(dot, link);
__gnu_test::scoped_file l(link, __gnu_test::scoped_file::adopt_file);
st2 = fs::symlink_status(link, ec);
VERIFY( !ec );
VERIFY( st2.type() == fs::file_type::symlink );
+#endif
}
void
void
test03()
{
+#ifndef NO_SYMLINKS
if (!__gnu_test::permissions_are_testable())
return;
std::error_code ec2;
fs::path p, p2;
try {
- fs::symlink_status(f.path);
+ (void) fs::symlink_status(f.path);
} catch (const fs::filesystem_error& e) {
caught = true;
p = e.path1();
VERIFY( st2.type() == fs::file_type::symlink );
fs::permissions(dir, fs::perms::owner_all, ec);
+#endif
}
void