ntdll: Fix two tests that fail on all NT platforms.
authorJames Hawkins <jhawkins@codeweavers.com>
Fri, 2 May 2008 08:12:43 +0000 (03:12 -0500)
committerAlexandre Julliard <julliard@winehq.org>
Fri, 2 May 2008 09:25:07 +0000 (11:25 +0200)
dlls/ntdll/tests/path.c

index 9d67b2c306d9de1f92bd569ba687d9036373ce4d..99d94829bcb6251027fee1c0551cff52c8adb203 100644 (file)
@@ -114,11 +114,9 @@ static void test_RtlIsDosDeviceName(void)
         { "c:nul. . . :",  4, 6 },
         { "c:nul . . :",   4, 6 },
         { "c:nul0",        0, 0 },
-        { "c:prn:aaa",     0, 0 },
         { "c:PRN:.txt",    4, 6 },
         { "c:aux:.txt...", 4, 6 },
         { "c:prn:.txt:",   4, 6 },
-        { "c:nul:aaa",     0, 0 },
         { "con:",          0, 6 },
         { "lpt1:",         0, 8 },
         { "c:com5:",       4, 8 },
@@ -147,6 +145,18 @@ static void test_RtlIsDosDeviceName(void)
             "Wrong result (%d,%d)/(%d,%d) for %s\n",
             HIWORD(ret), LOWORD(ret), test->pos, test->len, test->path );
     }
+
+    pRtlMultiByteToUnicodeN( buffer, sizeof(buffer), NULL, "c:prn:aaa", strlen("c:prn:aaa")+1 );
+    ret = pRtlIsDosDeviceName_U( buffer );
+    ok( ret == MAKELONG( 6, 4 ) || /* NT */
+        ret == MAKELONG( 0, 0), /* win9x */
+        "Wrong result (%d,%d)/(4,6) or (0,0) for c:prn:aaa\n", HIWORD(ret), LOWORD(ret) );
+
+    pRtlMultiByteToUnicodeN( buffer, sizeof(buffer), NULL, "c:nul:aaa", strlen("c:nul:aaa")+1 );
+    ret = pRtlIsDosDeviceName_U( buffer );
+    ok( ret == MAKELONG( 6, 4 ) || /* NT */
+        ret == MAKELONG( 0, 0), /* win9x */
+        "Wrong result (%d,%d)/(4,6) or (0,0) for c:nul:aaa\n", HIWORD(ret), LOWORD(ret) );
 }
 
 static void test_RtlIsNameLegalDOS8Dot3(void)