patch: Patch/ygo 25th set 2 (#14)

This commit is contained in:
Sebastian Dine
2026-05-11 11:27:32 +02:00
committed by GitHub
parent d6c7f60aee
commit 98f2575b5a
18 changed files with 612 additions and 6 deletions
+16
View File
@@ -112,6 +112,22 @@ TEST_SUITE("StdFileSystem") {
CHECK(r.value() == "hi");
}
TEST_CASE("writeText/readText work for top-level relative files") {
TempDir td;
StdFileSystem fs;
const auto oldCwd = fs::current_path();
fs::current_path(td.path);
const fs::path topLevel = "top-level.txt";
REQUIRE(fs.writeText(topLevel, "hello").isOk());
const auto r = fs.readText(topLevel);
REQUIRE(r.isOk());
CHECK(r.value() == "hello");
std::error_code ec;
fs::current_path(oldCwd, ec);
}
TEST_CASE("copyFile copies bytes and respects overwrite flag") {
TempDir td;
StdFileSystem fs;