kernel32: Loosen requirements on what QueryDosDevice returns.

This commit is contained in:
Hans Leidekker 2007-11-11 16:05:09 +01:00 committed by Alexandre Julliard
parent 8de6c8b4a9
commit addf895c87
1 changed files with 4 additions and 11 deletions

View File

@ -21,12 +21,6 @@
#include "wine/test.h" #include "wine/test.h"
#include "winbase.h" #include "winbase.h"
#define CDROM "CDROM"
#define FLOPPY "FLOPPY"
#define HARDISK "HARDDISK"
#define LANMAN "LANMANREDIRECTOR"
#define RAMDISK "RAMDISK"
static HINSTANCE hdll; static HINSTANCE hdll;
static BOOL (WINAPI * pGetVolumeNameForVolumeMountPointA)(LPCSTR, LPSTR, DWORD); static BOOL (WINAPI * pGetVolumeNameForVolumeMountPointA)(LPCSTR, LPSTR, DWORD);
static BOOL (WINAPI * pGetVolumeNameForVolumeMountPointW)(LPCWSTR, LPWSTR, DWORD); static BOOL (WINAPI * pGetVolumeNameForVolumeMountPointW)(LPCWSTR, LPWSTR, DWORD);
@ -38,17 +32,16 @@ static void test_query_dos_deviceA(void)
char drivestr[] = "a:"; char drivestr[] = "a:";
char *p, buffer[2000]; char *p, buffer[2000];
DWORD ret; DWORD ret;
BOOL found = FALSE;
for (;drivestr[0] <= 'z'; drivestr[0]++) { for (;drivestr[0] <= 'z'; drivestr[0]++) {
ret = QueryDosDeviceA( drivestr, buffer, sizeof(buffer)); ret = QueryDosDeviceA( drivestr, buffer, sizeof(buffer));
if(ret) { if(ret) {
for (p = buffer; *p; p++) *p = toupper(*p); for (p = buffer; *p; p++) *p = toupper(*p);
todo_wine if (strstr(buffer, "HARDDISK") || strstr(buffer, "RAMDISK")) found = TRUE;
ok( strstr( buffer, CDROM) || strstr( buffer, FLOPPY) ||
strstr( buffer, HARDISK) || strstr( buffer, LANMAN) ||
strstr( buffer, RAMDISK), "expect the string %s contains %s,%s,%s,%s or %s\n",
buffer, CDROM, FLOPPY, HARDISK, LANMAN, RAMDISK);
} }
} }
todo_wine ok(found, "expected at least one devicename to contain HARDDISK or RAMDISK\n");
} }
static void test_GetVolumeNameForVolumeMountPointA(void) static void test_GetVolumeNameForVolumeMountPointA(void)