System: Improve screenshot naming

This commit is contained in:
Stenzek
2024-03-15 15:21:06 +10:00
parent 6aa491f863
commit 43eb6e20fa
5 changed files with 50 additions and 10 deletions

View File

@ -243,6 +243,16 @@ TEST(Path, SanitizeFileName)
ASSERT_EQ(Path::SanitizeFileName("foo/bar", false), "foo/bar");
}
TEST(Path, RemoveLengthLimits)
{
#ifdef _WIN32
ASSERT_EQ(Path::RemoveLengthLimits("C:\\foo"), "\\\\?\\C:\\foo");
ASSERT_EQ(Path::RemoveLengthLimits("\\\\foo\\bar\\baz"), "\\\\?\\\\\\foo\\bar\\baz");
#else
ASSERT_EQ(Path::RemoveLengthLimits("/foo/bar/baz"), "/foo/bar/baz");
#endif
}
#if 0
// Relies on presence of files.