1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

Make unittests less reliant on files in the source distribution

This commit is contained in:
sfan5 2024-01-10 19:10:58 +01:00
parent 863c9b55b4
commit 133f706bf3
11 changed files with 70 additions and 79 deletions

View file

@ -269,7 +269,7 @@ void TestFileSys::testRemoveRelativePathComponent()
void TestFileSys::testSafeWriteToFile()
{
const std::string dest_path = fs::TempPath() + DIR_DELIM + "testSafeWriteToFile.txt";
const std::string dest_path = getTestTempFile();
const std::string test_data("hello\0world", 11);
fs::safeWriteToFile(dest_path, test_data);
UASSERT(fs::PathExists(dest_path));