Saulius Krasuckas : lz32/tests: WinME sometimes returns short
filenames.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Oct 10 13:19:13 CDT 2006
Module: wine
Branch: master
Commit: e05035da18267b46eb69e704ae29eda33e26f4f4
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e05035da18267b46eb69e704ae29eda33e26f4f4
Author: Saulius Krasuckas <saulius.krasuckas at ieee.org>
Date: Tue Oct 10 19:38:13 2006 +0300
lz32/tests: WinME sometimes returns short filenames.
---
dlls/lz32/tests/lzexpand_main.c | 37 ++++++++++++++++++++++---------------
1 files changed, 22 insertions(+), 15 deletions(-)
diff --git a/dlls/lz32/tests/lzexpand_main.c b/dlls/lz32/tests/lzexpand_main.c
index 613317f..6c5f150 100644
--- a/dlls/lz32/tests/lzexpand_main.c
+++ b/dlls/lz32/tests/lzexpand_main.c
@@ -353,6 +353,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. */
@@ -384,6 +385,7 @@ static void test_LZOpenFileA(void)
/* Check various opening options: */
memset(&test, 0xA5, sizeof(test));
+ full_file_path_name_in_a_CWD(filename_, short_expected, TRUE);
/* a, for reading. */
file = LZOpenFileA(filename_, &test, OF_READ);
@@ -392,9 +394,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));
@@ -406,9 +409,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));
@@ -420,9 +424,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));
@@ -434,9 +439,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));
@@ -448,9 +454,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_);
More information about the wine-cvs
mailing list