mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-13 22:58:50 +00:00
[VFS] Extend virtual working directory test
Extend the virtual working directory test with a few edge cases that are not currently tested.
This commit is contained in:
parent
1f2a1c8f2e
commit
0cb51e13f5
@ -2089,6 +2089,16 @@ TEST_F(VFSFromYAMLTest, WorkingDirectoryFallthrough) {
|
||||
" 'external-contents': '//root/foo/a'\n"
|
||||
" }\n"
|
||||
" ]\n"
|
||||
"},\n"
|
||||
"{\n"
|
||||
" 'type': 'directory',\n"
|
||||
" 'name': '//root/bar/baz',\n"
|
||||
" 'contents': [ {\n"
|
||||
" 'type': 'file',\n"
|
||||
" 'name': 'a',\n"
|
||||
" 'external-contents': '//root/foo/a'\n"
|
||||
" }\n"
|
||||
" ]\n"
|
||||
"}\n"
|
||||
"]\n"
|
||||
"}",
|
||||
@ -2125,6 +2135,21 @@ TEST_F(VFSFromYAMLTest, WorkingDirectoryFallthrough) {
|
||||
Status = FS->status("c");
|
||||
ASSERT_FALSE(Status.getError());
|
||||
EXPECT_TRUE(Status->exists());
|
||||
|
||||
Status = FS->status("./bar/baz/a");
|
||||
ASSERT_FALSE(Status.getError());
|
||||
EXPECT_TRUE(Status->exists());
|
||||
|
||||
EC = FS->setCurrentWorkingDirectory("//root/bar");
|
||||
ASSERT_FALSE(EC);
|
||||
|
||||
Status = FS->status("./baz/a");
|
||||
ASSERT_FALSE(Status.getError());
|
||||
EXPECT_TRUE(Status->exists());
|
||||
|
||||
Status = FS->status("../bar/baz/a");
|
||||
ASSERT_FALSE(Status.getError());
|
||||
EXPECT_TRUE(Status->exists());
|
||||
}
|
||||
|
||||
TEST_F(VFSFromYAMLTest, WorkingDirectoryFallthroughInvalid) {
|
||||
|
Loading…
Reference in New Issue
Block a user