diff --git a/modules/rostests/apitests/user32/PrivateExtractIcons.c b/modules/rostests/apitests/user32/PrivateExtractIcons.c index 85edab85a16..aff24a195ed 100644 --- a/modules/rostests/apitests/user32/PrivateExtractIcons.c +++ b/modules/rostests/apitests/user32/PrivateExtractIcons.c @@ -27,8 +27,9 @@ BOOL ResourceToFile(INT i, PCWSTR FileName) if (FileExists(FileName)) { - skip("'%S' already exists. Exiting now\n", FileName); - return FALSE; + /* We should only be using %temp% paths, so deleting here should be OK */ + printf("Deleting '%S' that already exists.\n", FileName); + DeleteFileW(FileName); } hRes = FindResourceW(NULL, MAKEINTRESOURCEW(i), MAKEINTRESOURCEW(RT_RCDATA)); @@ -90,6 +91,12 @@ static struct /* Icon group file containing one PNG icon and one normal icon */ {L"%temp%\\ROS.ico", 1, 1, TRUE}, + + /* Executable file with bad 'Icon Group' but good 'Icons'. + * Windows explorer shows the program's icon correctly in WinXP/Win2K3 + * but Windows 7 shows only a default icon. This is analogous + * to EXE's generated by older Watcom C/C++ versions. */ + {L"%temp%\\cpimg2e.exe", 1, 1, TRUE}, }; static struct @@ -100,6 +107,7 @@ static struct { {L"%temp%\\ROS.ico", IDR_ICONS_PNG}, {L"%temp%\\sysicon.ico", IDR_ICONS_NORMAL}, + {L"%temp%\\cpimg2e.exe", IDR_EXE_NORMAL} }; START_TEST(PrivateExtractIcons) diff --git a/modules/rostests/apitests/user32/cpimg2e.exe b/modules/rostests/apitests/user32/cpimg2e.exe new file mode 100644 index 00000000000..db9d844a615 Binary files /dev/null and b/modules/rostests/apitests/user32/cpimg2e.exe differ diff --git a/modules/rostests/apitests/user32/resource.h b/modules/rostests/apitests/user32/resource.h index ac91b1b51be..33972fde705 100644 --- a/modules/rostests/apitests/user32/resource.h +++ b/modules/rostests/apitests/user32/resource.h @@ -3,3 +3,4 @@ #define IDR_ICONS_PNG 2000 #define IDR_ICONS_NORMAL 2001 +#define IDR_EXE_NORMAL 2002 diff --git a/modules/rostests/apitests/user32/user32_apitest.rc b/modules/rostests/apitests/user32/user32_apitest.rc index 370c3aaa721..155390fc217 100644 --- a/modules/rostests/apitests/user32/user32_apitest.rc +++ b/modules/rostests/apitests/user32/user32_apitest.rc @@ -10,6 +10,7 @@ TESTCURSOR CURSOR "test.cur" IDR_ICONS_PNG RCDATA "ROS.ico" IDR_ICONS_NORMAL RCDATA "sysicon.ico" +IDR_EXE_NORMAL RCDATA "cpimg2e.exe" TESTDIALOG DIALOG 0,0, 200,200 CLASS "TestDialogClass"