upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/test/file_system_test.cpp
diff options
context:
space:
mode:
authorNotRexed <therealnothingfn@gmail.com>2026-11-27 17:58:38 -0500
committerNotRexed <therealnothingfn@gmail.com>2026-11-27 17:58:38 -0500
commit00131bb85ee294179e5179b00a2c68f4ea3610b5 (patch)
tree11854f35d928e964919b81746360146c3657ce07 /runtime/test/file_system_test.cpp
parenteac96d744c3a899fa6e326e296f387fe11e05eab (diff)
main keeps its own runtime, tools and tests; the branch's variants stay on port/d3d12-nvidia
After the merge the tree held this branch's older states of files main maintains. Run against main's code, tests/test_acphal_abi.py and 11 of the 15 translator tests that differed failed, and the C++ runtime would have been built from two generations of its sources. So that the merge cannot break what main builds and tests: - runtime/ is main's, file for file (68 files only this branch had are not carried over); - every file under tools/, tests/ and docs/ that both sides have is main's (80 files); - ten translator tests only this branch has, which test rules main's translator does not have, and their fixtures are left out. What main gains: d3d12/ (the Rust D3D12 runtime), its launchers and helpers (Launcher.bat, scripts/play*.ps1, play-linux.sh, port_ctl.py, smooth-motion.ps1, fetch_vkd3d_proton.py, sync_victory.py), mods/example_lua, eleven notes under docs/, seven tools and the tests that pass with main's code, the README's sections and credits, and the "Runtime traps" section of AGENTS.md. Everything left out here is on the branch port/d3d12-nvidia. Checked: compileall; make_game.py --help; check_no_game_data.py over every file this adds to main; the line-ending, docs-encoding, CI-registration and docs tests; each test file that differs from main, on its own. Not run: the whole translator suite, the C++ build, cargo over d3d12/ after the merge (d3d12/ is byte for byte the branch's), CI. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Diffstat (limited to 'runtime/test/file_system_test.cpp')
-rw-r--r--runtime/test/file_system_test.cpp26
1 files changed, 0 insertions, 26 deletions
diff --git a/runtime/test/file_system_test.cpp b/runtime/test/file_system_test.cpp
index db8a8f8fb..af37935f6 100644
--- a/runtime/test/file_system_test.cpp
+++ b/runtime/test/file_system_test.cpp
@@ -1395,32 +1395,6 @@ void run_checks(const std::filesystem::path& root) {
1395 if (h != INVALID_HANDLE_VALUE) ::CloseHandle(h); 1395 if (h != INVALID_HANDLE_VALUE) ::CloseHandle(h);
1396 check(attributes_w(L"G:\\data\\sub") != INVALID_FILE_ATTRIBUTES, "GetFileAttributesW stats a G: folder"); 1396 check(attributes_w(L"G:\\data\\sub") != INVALID_FILE_ATTRIBUTES, "GetFileAttributesW stats a G: folder");
1397 1397
1398 // GetDiskFreeSpace(Ex) and SetCurrentDirectory on a console path ask the folder behind it (VIctory files.rs).
1399 using FreeExW = BOOL(WINAPI*)(LPCWSTR, PULARGE_INTEGER, PULARGE_INTEGER, PULARGE_INTEGER);
1400 using FreeA = BOOL(WINAPI*)(LPCSTR, LPDWORD, LPDWORD, LPDWORD, LPDWORD);
1401 using SetDirW = BOOL(WINAPI*)(LPCWSTR);
1402 const auto free_ex_w = resolve<FreeExW>("kernel32.dll", "GetDiskFreeSpaceExW");
1403 const auto free_a = resolve<FreeA>("kernelbase.dll", "GetDiskFreeSpaceA");
1404 const auto set_dir_w = resolve<SetDirW>("api-ms-win-core-processenvironment-l1-1-0.dll", "SetCurrentDirectoryW");
1405 ULARGE_INTEGER avail{}, total{}, total_free{}, host_total{};
1406 ::GetDiskFreeSpaceExW((package.wstring() + L"\\").c_str(), nullptr, &host_total, nullptr);
1407 check(free_ex_w && free_ex_w(L"G:\\", &avail, &total, &total_free) && total.QuadPart == host_total.QuadPart &&
1408 total.QuadPart > 0,
1409 "GetDiskFreeSpaceExW(G:\\) answers for the game folder's volume");
1410 DWORD spc = 0, bps = 0, fc = 0, tc = 0;
1411 check(free_a && free_a("GAME:\\drives\\", &spc, &bps, &fc, &tc) && bps > 0 && tc > 0,
1412 "GetDiskFreeSpaceA on a GAME: folder answers too");
1413 SetLastError(0);
1414 check(free_ex_w && !free_ex_w(L"G:\\..\\", &avail, nullptr, nullptr) && GetLastError() == ERROR_INVALID_NAME,
1415 "a path that climbs out of the drive is refused");
1416 wchar_t before[MAX_PATH] = {};
1417 ::GetCurrentDirectoryW(MAX_PATH, before);
1418 wchar_t now[MAX_PATH] = {};
1419 check(set_dir_w && set_dir_w(L"G:\\drives\\sub") && ::GetCurrentDirectoryW(MAX_PATH, now) > 0 &&
1420 std::filesystem::equivalent(std::filesystem::path(now), package / "drives" / "sub"),
1421 "SetCurrentDirectoryW(G:\\drives\\sub) enters the package folder");
1422 ::SetCurrentDirectoryW(before);
1423
1424 SetLastError(0); 1398 SetLastError(0);
1425 check(create_w(L"G:\\..\\x.txt", GENERIC_READ, FILE_SHARE_READ, nullptr, OPEN_EXISTING, 0, nullptr) == 1399 check(create_w(L"G:\\..\\x.txt", GENERIC_READ, FILE_SHARE_READ, nullptr, OPEN_EXISTING, 0, nullptr) ==
1426 INVALID_HANDLE_VALUE && 1400 INVALID_HANDLE_VALUE &&