From a70b1c2941dc192fc07486e748fdbf12047102f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Sch=C3=BCmann?= Date: Sun, 23 Sep 2018 21:19:30 +0200 Subject: [PATCH] Changed permission test to also work with MS std::filesystem. --- test/filesystem_test.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/filesystem_test.cpp b/test/filesystem_test.cpp index bf09359..a4fcd2b 100644 --- a/test/filesystem_test.cpp +++ b/test/filesystem_test.cpp @@ -1885,7 +1885,8 @@ TEST_CASE("30.10.15.26 permissions", "[filesystem][operations][fs.op.permissions TemporaryDirectory t(TempOpt::change_path); std::error_code ec; generateFile("foo", 512); - CHECK_NOTHROW(fs::permissions("foo", fs::perms::owner_write, fs::perm_options::remove)); + auto allWrite = fs::perms::owner_write | fs::perms::group_write | fs::perms::others_write; + CHECK_NOTHROW(fs::permissions("foo", allWrite, fs::perm_options::remove)); CHECK((fs::status("foo").permissions() & fs::perms::owner_write) != fs::perms::owner_write); CHECK_THROWS_AS(fs::resize_file("foo", 1024), fs::filesystem_error); CHECK(fs::file_size("foo") == 512);