From: Brendan Shanks bshanks@codeweavers.com
--- dlls/shell32/tests/shelllink.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
diff --git a/dlls/shell32/tests/shelllink.c b/dlls/shell32/tests/shelllink.c index c8a0308a9cb..13dce3302c7 100644 --- a/dlls/shell32/tests/shelllink.c +++ b/dlls/shell32/tests/shelllink.c @@ -1174,6 +1174,7 @@ static void test_ExtractIcon(void) { static const WCHAR nameW[] = {'\','e','x','t','r','a','c','t','i','c','o','n','_','t','e','s','t','.','t','x','t',0}; static const WCHAR shell32W[] = {'s','h','e','l','l','3','2','.','d','l','l',0}; + static const WCHAR emptyW[] = {0}; WCHAR pathW[MAX_PATH]; HICON hicon, hicon2; char path[MAX_PATH]; @@ -1223,6 +1224,14 @@ static void test_ExtractIcon(void) r = DeleteFileA(path); ok(r, "failed to delete file %s (%ld)\n", path, GetLastError());
+ /* Empty file path */ + hicon = ExtractIconA(NULL, "", -1); + ok(hicon == NULL, "Got icon %p\n", hicon); + + hicon = ExtractIconA(NULL, "", 0); + todo_wine + ok(hicon == NULL, "Got icon %p\n", hicon); + /* same for W variant */ if (0) { @@ -1270,6 +1279,14 @@ if (0)
r = DeleteFileW(pathW); ok(r, "failed to delete file %s (%ld)\n", path, GetLastError()); + + /* Empty file path */ + hicon = ExtractIconW(NULL, emptyW, -1); + ok(hicon == NULL, "Got icon %p\n", hicon); + + hicon = ExtractIconW(NULL, emptyW, 0); + todo_wine + ok(hicon == NULL, "Got icon %p\n", hicon); }
static void test_ExtractAssociatedIcon(void)