Author: cwittich
Date: Sun Dec 28 04:36:50 2008
New Revision: 38409
URL:
http://svn.reactos.org/svn/reactos?rev=38409&view=rev
Log:
sync advpack winetest to wine 1.1.11
Modified:
trunk/rostests/winetests/advpack/advpack.c
trunk/rostests/winetests/advpack/files.c
trunk/rostests/winetests/advpack/install.c
Modified: trunk/rostests/winetests/advpack/advpack.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/advpack/advpack…
==============================================================================
--- trunk/rostests/winetests/advpack/advpack.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/advpack/advpack.c [iso-8859-1] Sun Dec 28 04:36:50 2008
@@ -264,7 +264,7 @@
if(hr == HRESULT_FROM_WIN32(ERROR_MOD_NOT_FOUND))
{
- trace("WinNT 3.51 detected. Skipping tests for
TranslateInfString()\n");
+ win_skip("WinNT 3.51 detected. Skipping tests for
TranslateInfString()\n");
return;
}
@@ -324,6 +324,13 @@
HRESULT hr;
char buffer[MAX_PATH];
DWORD size = MAX_PATH;
+
+ hr = pOpenINFEngine(inf_file, NULL, 0, &hinf, NULL);
+ if (hr == E_UNEXPECTED)
+ {
+ skip("Skipping tests on win9x because of brokenness\n");
+ return;
+ }
create_inf_file();
Modified: trunk/rostests/winetests/advpack/files.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/advpack/files.c…
==============================================================================
--- trunk/rostests/winetests/advpack/files.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/advpack/files.c [iso-8859-1] Sun Dec 28 04:36:50 2008
@@ -97,6 +97,7 @@
static void test_AddDelBackupEntry(void)
{
+ BOOL ret;
HRESULT res;
CHAR path[MAX_PATH];
CHAR windir[MAX_PATH];
@@ -165,7 +166,10 @@
res = pAddDelBackupEntry("one\0three\0", NULL, "basename",
AADBE_DEL_ENTRY);
SetFileAttributesA(path, FILE_ATTRIBUTE_NORMAL);
ok(res == S_OK, "Expected S_OK, got %d\n", res);
- ok(DeleteFileA(path), "Expected path to exist\n");
+ ret = DeleteFileA(path);
+ ok(ret == TRUE ||
+ broken(ret == FALSE), /* win98 */
+ "Expected path to exist\n");
}
/* the FCI callbacks */
Modified: trunk/rostests/winetests/advpack/install.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/advpack/install…
==============================================================================
--- trunk/rostests/winetests/advpack/install.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/advpack/install.c [iso-8859-1] Sun Dec 28 04:36:50 2008
@@ -55,27 +55,20 @@
return (((err & SPAPI_MASK) ^ SPAPI_PREFIX) == 0);
}
-static void append_str(char **str, const char *data)
-{
- sprintf(*str, data);
- *str += strlen(*str);
-}
-
static void create_inf_file(LPCSTR filename)
{
- char data[1024];
- char *ptr = data;
DWORD dwNumberOfBytesWritten;
HANDLE hf = CreateFile(filename, GENERIC_WRITE, 0, NULL,
CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
- append_str(&ptr, "[Version]\n");
- append_str(&ptr, "Signature=\"$Chicago$\"\n");
- append_str(&ptr, "AdvancedINF=2.5\n");
- append_str(&ptr, "[DefaultInstall]\n");
- append_str(&ptr, "CheckAdminRights=1\n");
-
- WriteFile(hf, data, ptr - data, &dwNumberOfBytesWritten, NULL);
+ static const char data[] =
+ "[Version]\n"
+ "Signature=\"$Chicago$\"\n"
+ "AdvancedINF=2.5\n"
+ "[DefaultInstall]\n"
+ "CheckAdminRights=1\n";
+
+ WriteFile(hf, data, sizeof(data) - 1, &dwNumberOfBytesWritten, NULL);
CloseHandle(hf);
}