mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-05 14:34:55 +00:00
Test case for graceful handling of long file names on Windows. Patch thanks to Paul Robinson!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177223 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8647750dfb
commit
551152f7d8
@ -224,6 +224,18 @@ TEST_F(FileSystemTest, TempFiles) {
|
||||
// Make sure Temp1 doesn't exist.
|
||||
ASSERT_NO_ERROR(fs::exists(Twine(TempPath), TempFileExists));
|
||||
EXPECT_FALSE(TempFileExists);
|
||||
|
||||
#ifdef LLVM_ON_WIN32
|
||||
// Path name > 260 chars should get an error.
|
||||
const char *Path270 =
|
||||
"abcdefghijklmnopqrstuvwxyz9abcdefghijklmnopqrstuvwxyz8"
|
||||
"abcdefghijklmnopqrstuvwxyz7abcdefghijklmnopqrstuvwxyz6"
|
||||
"abcdefghijklmnopqrstuvwxyz5abcdefghijklmnopqrstuvwxyz4"
|
||||
"abcdefghijklmnopqrstuvwxyz3abcdefghijklmnopqrstuvwxyz2"
|
||||
"abcdefghijklmnopqrstuvwxyz1abcdefghijklmnopqrstuvwxyz0";
|
||||
EXPECT_EQ(fs::unique_file(Twine(Path270), FileDescriptor, TempPath),
|
||||
windows_error::path_not_found);
|
||||
#endif
|
||||
}
|
||||
|
||||
TEST_F(FileSystemTest, DirectoryIteration) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user