Module: wine Branch: master Commit: bbd4e078c6689a9124fd6d468ead127949d8e71f URL: http://source.winehq.org/git/wine.git/?a=commit;h=bbd4e078c6689a9124fd6d468e...
Author: Paul Vriens Paul.Vriens.Wine@gmail.com Date: Wed Jan 21 16:56:14 2009 +0100
shell32/tests: Fix a test on Win9x, WinME and W2K.
---
dlls/shell32/tests/shlfolder.c | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/dlls/shell32/tests/shlfolder.c b/dlls/shell32/tests/shlfolder.c index 8a3ce81..cc32a00 100644 --- a/dlls/shell32/tests/shlfolder.c +++ b/dlls/shell32/tests/shlfolder.c @@ -421,12 +421,19 @@ static void test_GetDisplayName(void) return; }
- /* WinXP stores the filenames as both ANSI and UNICODE in the pidls */ pidlLast = pILFindLastID(pidlTestFile); - ok(pidlLast->mkid.cb >=76, "Expected pidl length of at least 76, got %d.\n", pidlLast->mkid.cb); + ok(pidlLast->mkid.cb >=76 || + broken(pidlLast->mkid.cb == 28) || /* W2K */ + broken(pidlLast->mkid.cb == 40), /* Win9x, WinME */ + "Expected pidl length of at least 76, got %d.\n", pidlLast->mkid.cb); + if (pidlLast->mkid.cb >= 28) { + ok(!lstrcmpA((CHAR*)&pidlLast->mkid.abID[12], szFileName), + "Filename should be stored as ansi-string at this position!\n"); + } + /* WinXP and up store the filenames as both ANSI and UNICODE in the pidls */ if (pidlLast->mkid.cb >= 76) { ok(!lstrcmpW((WCHAR*)&pidlLast->mkid.abID[46], wszFileName), - "WinXP stores the filename as a wchar-string at this position!\n"); + "Filename should be stored as wchar-string at this position!\n"); }
/* It seems as if we cannot bind to regular files on windows, but only directories.