[PATCH 4/5] lz32/tests: WinME sometimes returns short filenames.

Saulius Krasuckas saulius.krasuckas at ieee.org
Thu Oct 5 12:51:29 CDT 2006


The reason is unknown for me.  During debug process the test also fails 
with different results often at simple numerical checks on WinME.  That 
may be some kind of overflow bug in the dll of Windows Millenium.

---

 dlls/lz32/tests/lzexpand_main.c |   36 +++++++++++++++++++++---------------
 1 files changed, 21 insertions(+), 15 deletions(-)

b50ea4f5c1e272d0cbaf18c7c62347afabb69111
diff --git a/dlls/lz32/tests/lzexpand_main.c b/dlls/lz32/tests/lzexpand_main.c
index e7c9432..0a895b7 100644
--- a/dlls/lz32/tests/lzexpand_main.c
+++ b/dlls/lz32/tests/lzexpand_main.c
@@ -356,6 +356,7 @@ static void test_LZOpenFileA(void)
   INT file;
   static char badfilename_[] = "badfilename_";
   char expected[MAX_PATH];
+  char short_expected[MAX_PATH];
 
   SetLastError(0xfaceabee);
   /* Check for nonexistent file. */
@@ -401,9 +402,10 @@ static void test_LZOpenFileA(void)
      "LZOpenFileA set test.cBytes to %d\n", test.cBytes);
   ok(test.nErrCode == ERROR_SUCCESS,
      "LZOpenFileA set test.nErrCode to %d\n", test.nErrCode);
-  ok(lstrcmpA(test.szPathName, expected) == 0,
-     "LZOpenFileA returned '%s', but was expected to return '%s'\n",
-     test.szPathName, expected);
+  ok(lstrcmpA(test.szPathName, expected) == 0 ||
+     lstrcmpA(test.szPathName, short_expected) == 0, /* Win9x */
+     "LZOpenFileA returned '%s', but was expected to return '%s' or '%s'\n",
+     test.szPathName, expected, short_expected);
   LZClose(file);
 
   memset(&test, 0xA5, sizeof(test));
@@ -418,9 +420,10 @@ static void test_LZOpenFileA(void)
      "LZOpenFileA set test.cBytes to %d\n", test.cBytes);
   ok(test.nErrCode == ERROR_SUCCESS,
      "LZOpenFileA set test.nErrCode to %d\n", test.nErrCode);
-  ok(lstrcmpA(test.szPathName, expected) == 0,
-     "LZOpenFileA returned '%s', but was expected to return '%s'\n",
-     test.szPathName, expected);
+  ok(lstrcmpA(test.szPathName, expected) == 0 ||
+     lstrcmpA(test.szPathName, short_expected) == 0, /* Win9x */
+     "LZOpenFileA returned '%s', but was expected to return '%s' or '%s'\n",
+     test.szPathName, expected, short_expected);
   LZClose(file);
 
   memset(&test, 0xA5, sizeof(test));
@@ -435,9 +438,10 @@ static void test_LZOpenFileA(void)
      "LZOpenFileA set test.cBytes to %d\n", test.cBytes);
   ok(test.nErrCode == ERROR_SUCCESS,
      "LZOpenFileA set test.nErrCode to %d\n", test.nErrCode);
-  ok(lstrcmpA(test.szPathName, expected) == 0,
-     "LZOpenFileA returned '%s', but was expected to return '%s'\n",
-     test.szPathName, expected);
+  ok(lstrcmpA(test.szPathName, expected) == 0 ||
+     lstrcmpA(test.szPathName, short_expected) == 0, /* Win9x */
+     "LZOpenFileA returned '%s', but was expected to return '%s' or '%s'\n",
+     test.szPathName, expected, short_expected);
   LZClose(file);
 
   memset(&test, 0xA5, sizeof(test));
@@ -452,9 +456,10 @@ static void test_LZOpenFileA(void)
      "LZOpenFileA set test.cBytes to %d\n", test.cBytes);
   ok(test.nErrCode == ERROR_SUCCESS,
      "LZOpenFileA set test.nErrCode to %d\n", test.nErrCode);
-  ok(lstrcmpA(test.szPathName, expected) == 0,
-     "LZOpenFileA returned '%s', but was expected to return '%s'\n",
-     test.szPathName, expected);
+  ok(lstrcmpA(test.szPathName, expected) == 0 ||
+     lstrcmpA(test.szPathName, short_expected) == 0, /* Win9x */
+     "LZOpenFileA returned '%s', but was expected to return '%s' or '%s'\n",
+     test.szPathName, expected, short_expected);
   LZClose(file);
 
   memset(&test, 0xA5, sizeof(test));
@@ -470,9 +475,10 @@ static void test_LZOpenFileA(void)
      "LZOpenFileA set test.cBytes to %d\n", test.cBytes);
   ok(test.nErrCode == ERROR_SUCCESS,
      "LZOpenFileA set test.nErrCode to %d\n", test.nErrCode);
-  ok(lstrcmpA(test.szPathName, expected) == 0,
-     "LZOpenFileA returned '%s', but was expected to return '%s'\n",
-     test.szPathName, expected);
+  ok(lstrcmpA(test.szPathName, expected) == 0 ||
+     lstrcmpA(test.szPathName, short_expected) == 0, /* Win9x */
+     "LZOpenFileA returned '%s', but was expected to return '%s' or '%s'\n",
+     test.szPathName, expected, short_expected);
   LZClose(file);
 
   retval = GetFileAttributesA(filename_);
-- 
1.3.3



More information about the wine-patches mailing list