Saulius Krasuckas : lz32/tests: Be more verbose and aware of root
directory .
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Oct 10 13:19:13 CDT 2006
Module: wine
Branch: master
Commit: f29042b3a670aad22c139d858538f6f4c9827ba1
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f29042b3a670aad22c139d858538f6f4c9827ba1
Author: Saulius Krasuckas <saulius.krasuckas at ieee.org>
Date: Tue Oct 10 19:36:56 2006 +0300
lz32/tests: Be more verbose and aware of root directory.
---
dlls/lz32/tests/lzexpand_main.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/dlls/lz32/tests/lzexpand_main.c b/dlls/lz32/tests/lzexpand_main.c
index 593d98b..613317f 100644
--- a/dlls/lz32/tests/lzexpand_main.c
+++ b/dlls/lz32/tests/lzexpand_main.c
@@ -77,14 +77,18 @@ static void full_file_path_name_in_a_CWD
char shortname[MAX_PATH];
retval = GetCurrentDirectoryA(MAX_PATH, dst);
- ok(retval > 0, "GetCurrentDirectoryA returned %ld, GLE=0x%lx\n",
+ ok(retval > 0, "GetCurrentDirectoryA returned %ld, GLE=%ld\n",
retval, GetLastError());
- lstrcatA(dst, "\\");
+ if(dst[retval-1] != '\\')
+ /* Append backslash only when it's missing */
+ lstrcatA(dst, "\\");
lstrcatA(dst, src);
if(expect_short)
{
memcpy(shortname, dst, MAX_PATH);
- GetShortPathName(shortname, dst, MAX_PATH-1);
+ retval = GetShortPathName(shortname, dst, MAX_PATH-1);
+ ok(retval > 0, "GetShortPathName returned %ld for '%s', GLE=%ld\n",
+ retval, dst, GetLastError());
}
}
@@ -95,7 +99,7 @@ static void create_file(char *fname)
DWORD retval;
file = LZOpenFileA(fname, &ofs, OF_CREATE);
- ok(file >= 0, "LZOpenFileA failed on creation\n");
+ ok(file >= 0, "LZOpenFileA failed to create '%s'\n", fname);
LZClose(file);
retval = GetFileAttributesA(fname);
ok(retval != INVALID_FILE_ATTRIBUTES, "GetFileAttributesA('%s'): error %ld\n", ofs.szPathName, GetLastError());
@@ -108,7 +112,7 @@ static void delete_file(char *fname)
DWORD retval;
file = LZOpenFileA(fname, &ofs, OF_DELETE);
- ok(file >= 0, "LZOpenFileA failed on delete\n");
+ ok(file >= 0, "LZOpenFileA failed to delete '%s'\n", fname);
LZClose(file);
retval = GetFileAttributesA(fname);
ok(retval == INVALID_FILE_ATTRIBUTES, "GetFileAttributesA succeeded on deleted file ('%s')\n", ofs.szPathName);
More information about the wine-cvs
mailing list