Piotr Caban : ntdll: Don't use toupper in RtlIsNameLegalDOS8Dot3 tests.

Alexandre Julliard julliard at winehq.org
Tue Mar 26 16:43:14 CDT 2019


Module: wine
Branch: master
Commit: a799d41687658c85871ac883e78114047378830a
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=a799d41687658c85871ac883e78114047378830a

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Tue Mar 26 10:27:06 2019 +0100

ntdll: Don't use toupper in RtlIsNameLegalDOS8Dot3 tests.

Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ntdll/tests/path.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/dlls/ntdll/tests/path.c b/dlls/ntdll/tests/path.c
index c8a5951..195dea3 100644
--- a/dlls/ntdll/tests/path.c
+++ b/dlls/ntdll/tests/path.c
@@ -240,14 +240,13 @@ static void test_RtlIsNameLegalDOS8Dot3(void)
         ok( spaces == test->spaces, "Wrong spaces value %d/%d for '%s'\n", spaces, test->spaces, test->path );
         if (strlen(test->path) <= 12)
         {
+            STRING test_str;
             char str[13];
-            int i;
             strcpy( str, test->path );
-            for (i = 0; str[i]; i++) str[i] = toupper(str[i]);
-            ok( oem_ret.Length == strlen(test->path), "Wrong length %d/%d for '%s'\n",
-                oem_ret.Length, lstrlenA(test->path), test->path );
-            ok( !memcmp( oem_ret.Buffer, str, oem_ret.Length ),
-                "Wrong string '%.*s'/'%s'\n", oem_ret.Length, oem_ret.Buffer, str );
+            RtlInitString( &test_str, str );
+            RtlUpperString( &test_str, &test_str );
+            ok( !RtlCompareString(&oem_ret, &test_str, FALSE),
+                "Wrong string '%.*s'/'%s'\n", oem_ret.Length, oem_ret.Buffer, test->path );
         }
     }
 }




More information about the wine-cvs mailing list