[2/2] shell32/tests: Add a test for bug 6827: an SHGetFileInfo()
crash.
Francois Gouget
fgouget at free.fr
Wed Dec 13 11:13:46 CST 2006
---
Use the skip_wine infrastructure to add a test for bug 6827.
Bug 6827: The SimSig installer crashes
http://bugs.winehq.org/show_bug.cgi?id=6827
dlls/shell32/tests/shlfileop.c | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/dlls/shell32/tests/shlfileop.c b/dlls/shell32/tests/shlfileop.c
index c016b56..ceb4149 100644
--- a/dlls/shell32/tests/shlfileop.c
+++ b/dlls/shell32/tests/shlfileop.c
@@ -111,6 +111,28 @@ static void clean_after_shfo_tests(void)
RemoveDirectoryA("nonexistent");
}
+
+static void test_get_file_info(void)
+{
+ DWORD rc;
+ SHFILEINFO shfi;
+
+ skip_wine {
+ strcpy(shfi.szDisplayName, "dummy");
+ shfi.iIcon=0xdeadbeef;
+ rc=SHGetFileInfoA("c:\\nonexistent", FILE_ATTRIBUTE_DIRECTORY,
+ &shfi, sizeof(shfi),
+ SHGFI_ICONLOCATION | SHGFI_USEFILEATTRIBUTES);
+ ok(rc, "SHGetFileInfoA(c:\\nonexistent) returned %d\n", rc);
+ if (rc)
+ {
+ ok(strcpy(shfi.szDisplayName, "dummy") != 0, "SHGetFileInfoA(c:\\nonexistent) displayname is not set\n");
+ ok(shfi.iIcon != 0xdeadbeef, "SHGetFileInfoA(c:\\nonexistent) iIcon is not set\n");
+ }
+ }
+}
+
+
/*
puts into the specified buffer file names with current directory.
files - string with file names, separated by null characters. Ends on a double
@@ -855,6 +877,8 @@ START_TEST(shlfileop)
clean_after_shfo_tests();
+ test_get_file_info();
+
init_shfo_tests();
test_delete();
clean_after_shfo_tests();
--
1.4.4.1
More information about the wine-patches
mailing list