Commit ea5249fe authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

kernel32/tests: Add some more tests for FILE_ATTRIBUTE_REPARSE_POINT.

parent c84fd7cd
......@@ -1268,6 +1268,33 @@ static void test_mounted_folder(void)
HANDLE file;
DWORD size;
file = CreateFileA( "C:\\", 0, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, NULL );
ok(file != INVALID_HANDLE_VALUE, "got error %u\n", GetLastError());
status = NtQueryInformationFile( file, &io, &info, sizeof(info), FileAttributeTagInformation );
ok(!status, "got status %#x\n", status);
ok(!(info.FileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)
&& (info.FileAttributes & FILE_ATTRIBUTE_DIRECTORY), "got attributes %#x\n", info.FileAttributes);
ok(!info.ReparseTag, "got reparse tag %#x\n", info.ReparseTag);
CloseHandle( file );
file = CreateFileA( "C:\\", 0, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL );
ok(file != INVALID_HANDLE_VALUE, "got error %u\n", GetLastError());
status = NtQueryInformationFile( file, &io, &info, sizeof(info), FileAttributeTagInformation );
ok(!status, "got status %#x\n", status);
ok(!(info.FileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)
&& (info.FileAttributes & FILE_ATTRIBUTE_DIRECTORY), "got attributes %#x\n", info.FileAttributes);
ok(!info.ReparseTag, "got reparse tag %#x\n", info.ReparseTag);
CloseHandle( file );
ret = GetFileAttributesA( "C:\\" );
ok(!(ret & FILE_ATTRIBUTE_REPARSE_POINT) && (ret & FILE_ATTRIBUTE_DIRECTORY), "got attributes %#x\n", ret);
ret = CreateDirectoryA("C:\\winetest_mnt", NULL);
if (!ret && GetLastError() == ERROR_ACCESS_DENIED)
{
......@@ -1324,6 +1351,10 @@ static void test_mounted_folder(void)
CloseHandle( file );
ret = GetFileAttributesA( "C:\\winetest_mnt" );
ok(ret != INVALID_FILE_ATTRIBUTES, "got error %u\n", GetLastError());
ok((ret & FILE_ATTRIBUTE_REPARSE_POINT) && (ret & FILE_ATTRIBUTE_DIRECTORY), "got attributes %#x\n", ret);
file = CreateFileA( "C:\\winetest_mnt\\windows", 0, FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL );
ok(file != INVALID_HANDLE_VALUE, "got error %u\n", GetLastError());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment