Author: akhaldi Date: Sun Jun 16 11:10:56 2013 New Revision: 59227
URL: http://svn.reactos.org/svn/reactos?rev=59227&view=rev Log: [QMGR_WINETEST] * Sync with Wine 1.5.26.
Modified: trunk/rostests/winetests/qmgr/enum_files.c trunk/rostests/winetests/qmgr/enum_jobs.c trunk/rostests/winetests/qmgr/file.c trunk/rostests/winetests/qmgr/job.c trunk/rostests/winetests/qmgr/qmgr.c trunk/rostests/winetests/qmgr/testlist.c
Modified: trunk/rostests/winetests/qmgr/enum_files.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/qmgr/enum_files.... ============================================================================== --- trunk/rostests/winetests/qmgr/enum_files.c [iso-8859-1] (original) +++ trunk/rostests/winetests/qmgr/enum_files.c [iso-8859-1] Sun Jun 16 11:10:56 2013 @@ -18,13 +18,23 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
+#define WIN32_NO_STATUS +#define _INC_WINDOWS +#define COM_NO_WINDOWS_H + +#include <stdarg.h> + +#include <windef.h> +#include <winbase.h> +#include <winreg.h> + #include <shlwapi.h> -#include <stdio.h> +//#include <stdio.h>
#define COBJMACROS
-#include "wine/test.h" -#include "bits.h" +#include <wine/test.h> +#include <bits.h>
/* Globals used by many tests */ #define NUM_FILES 2 /* At least two. */ @@ -226,7 +236,7 @@ ok(hres == S_OK, "Skip failed: %08x\n", hres); if(hres != S_OK) { - skip("Unable to propely Skip files\n"); + skip("Unable to properly Skip files\n"); return; } }
Modified: trunk/rostests/winetests/qmgr/enum_jobs.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/qmgr/enum_jobs.c... ============================================================================== --- trunk/rostests/winetests/qmgr/enum_jobs.c [iso-8859-1] (original) +++ trunk/rostests/winetests/qmgr/enum_jobs.c [iso-8859-1] Sun Jun 16 11:10:56 2013 @@ -18,12 +18,17 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-#include <stdio.h> +//#include <stdio.h> + +#define WIN32_NO_STATUS +#define _INC_WINDOWS +#define COM_NO_WINDOWS_H
#define COBJMACROS
-#include "wine/test.h" -#include "bits.h" +#include <wine/test.h> +#include <objbase.h> +#include <bits.h>
/* Globals used by many tests */ static const WCHAR test_displayNameA[] = {'T','e','s','t','A', 0}; @@ -218,7 +223,7 @@ { ok(jobs[i] != NULL, "Next returned NULL\n"); if (jobs[i]) - IBackgroundCopyFile_Release(jobs[i]); + IBackgroundCopyJob_Release(jobs[i]); }
HeapFree(GetProcessHeap(), 0, jobs); @@ -247,7 +252,7 @@ ok(hres == S_OK, "Skip failed: %08x\n", hres); if(hres != S_OK) { - skip("Unable to propely Skip jobs\n"); + skip("Unable to properly Skip jobs\n"); return; } }
Modified: trunk/rostests/winetests/qmgr/file.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/qmgr/file.c?rev=... ============================================================================== --- trunk/rostests/winetests/qmgr/file.c [iso-8859-1] (original) +++ trunk/rostests/winetests/qmgr/file.c [iso-8859-1] Sun Jun 16 11:10:56 2013 @@ -18,14 +18,24 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-#include <stdio.h> +//#include <stdio.h> + +#include <stdarg.h> + +#define WIN32_NO_STATUS +#define _INC_WINDOWS +#define COM_NO_WINDOWS_H + +#include <windef.h> +#include <winbase.h> +#include <winreg.h>
#include <shlwapi.h>
#define COBJMACROS
-#include "wine/test.h" -#include "bits.h" +#include <wine/test.h> +#include <bits.h>
/* Globals used by many tests */ #define NUM_FILES 1 @@ -162,7 +172,7 @@ (DWORD)(progress.BytesTotal >> 32), (DWORD)progress.BytesTotal); ok(progress.BytesTransferred == 0, "Got incorrect number of transferred bytes: %x%08x\n", (DWORD)(progress.BytesTransferred >> 32), (DWORD)progress.BytesTransferred); - ok(progress.Completed == FALSE, "Got incorret completion status\n"); + ok(progress.Completed == FALSE, "Got incorrect completion status\n"); }
typedef void (*test_t)(void);
Modified: trunk/rostests/winetests/qmgr/job.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/qmgr/job.c?rev=5... ============================================================================== --- trunk/rostests/winetests/qmgr/job.c [iso-8859-1] (original) +++ trunk/rostests/winetests/qmgr/job.c [iso-8859-1] Sun Jun 16 11:10:56 2013 @@ -18,75 +18,41 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-#include <stdio.h> +//#include <stdio.h> + +#define WIN32_NO_STATUS +#define _INC_WINDOWS +#define COM_NO_WINDOWS_H
#define COBJMACROS
-#include "wine/test.h" -#include "bits.h" -#include "initguid.h" +#include <wine/test.h> +#include <objbase.h> +#include <bits.h> +#include <initguid.h>
/* Globals used by many tests */ static const WCHAR test_displayName[] = {'T', 'e', 's', 't', 0}; -static const WCHAR test_remoteNameA[] = {'r','e','m','o','t','e','A', 0}; -static const WCHAR test_remoteNameB[] = {'r','e','m','o','t','e','B', 0}; -static const WCHAR test_localNameA[] = {'l','o','c','a','l','A', 0}; -static const WCHAR test_localNameB[] = {'l','o','c','a','l','B', 0}; -static WCHAR *test_currentDir; -static WCHAR *test_remotePathA; -static WCHAR *test_remotePathB; -static WCHAR *test_localPathA; -static WCHAR *test_localPathB; +static WCHAR test_remotePathA[MAX_PATH]; +static WCHAR test_remotePathB[MAX_PATH]; +static WCHAR test_localPathA[MAX_PATH]; +static WCHAR test_localPathB[MAX_PATH]; static IBackgroundCopyManager *test_manager; static IBackgroundCopyJob *test_job; static GUID test_jobId; static BG_JOB_TYPE test_type;
-static BOOL init_paths(void) -{ - static const WCHAR format[] = {'%','s','\','%','s', 0}; - DWORD n; - - n = GetCurrentDirectoryW(0, NULL); - if (n == 0) - { - skip("Couldn't get current directory size\n"); - return FALSE; - } - - test_currentDir = HeapAlloc(GetProcessHeap(), 0, n * sizeof(WCHAR)); - test_localPathA - = HeapAlloc(GetProcessHeap(), 0, - (n + 1 + lstrlenW(test_localNameA)) * sizeof(WCHAR)); - test_localPathB - = HeapAlloc(GetProcessHeap(), 0, - (n + 1 + lstrlenW(test_localNameB)) * sizeof(WCHAR)); - test_remotePathA - = HeapAlloc(GetProcessHeap(), 0, - (n + 1 + lstrlenW(test_remoteNameA)) * sizeof(WCHAR)); - test_remotePathB - = HeapAlloc(GetProcessHeap(), 0, - (n + 1 + lstrlenW(test_remoteNameB)) * sizeof(WCHAR)); - - if (!test_currentDir || !test_localPathA || !test_localPathB - || !test_remotePathA || !test_remotePathB) - { - skip("Couldn't allocate memory for full paths\n"); - return FALSE; - } - - if (GetCurrentDirectoryW(n, test_currentDir) != n - 1) - { - skip("Couldn't get current directory\n"); - return FALSE; - } - - wsprintfW(test_localPathA, format, test_currentDir, test_localNameA); - wsprintfW(test_localPathB, format, test_currentDir, test_localNameB); - wsprintfW(test_remotePathA, format, test_currentDir, test_remoteNameA); - wsprintfW(test_remotePathB, format, test_currentDir, test_remoteNameB); - - return TRUE; +static VOID init_paths(void) +{ + WCHAR tmpDir[MAX_PATH]; + WCHAR prefix[] = {'q', 'm', 'g', 'r', 0}; + + GetTempPathW(MAX_PATH, tmpDir); + + GetTempFileNameW(tmpDir, prefix, 0, test_localPathA); + GetTempFileNameW(tmpDir, prefix, 0, test_localPathB); + GetTempFileNameW(tmpDir, prefix, 0, test_remotePathA); + GetTempFileNameW(tmpDir, prefix, 0, test_remotePathB); }
/* Generic test setup */ @@ -545,8 +511,7 @@ }; const test_t *test;
- if (!init_paths()) - return; + init_paths();
CoInitialize(NULL);
Modified: trunk/rostests/winetests/qmgr/qmgr.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/qmgr/qmgr.c?rev=... ============================================================================== --- trunk/rostests/winetests/qmgr/qmgr.c [iso-8859-1] (original) +++ trunk/rostests/winetests/qmgr/qmgr.c [iso-8859-1] Sun Jun 16 11:10:56 2013 @@ -18,13 +18,20 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-#include <stdio.h> +//#include <stdio.h> + +#define WIN32_NO_STATUS +#define _INC_WINDOWS +#define COM_NO_WINDOWS_H
#define COBJMACROS
-#include "wine/test.h" -#include "initguid.h" -#include "bits.h" +#include <wine/test.h> + +#include <winnls.h> +#include <initguid.h> +#include <objbase.h> +#include <bits.h>
static WCHAR progname[MAX_PATH];
@@ -38,6 +45,11 @@ /* Creating BITS instance */ hres = CoCreateInstance(&CLSID_BackgroundCopyManager, NULL, CLSCTX_LOCAL_SERVER, &IID_IBackgroundCopyManager, (void **) &manager); + + if(hres == __HRESULT_FROM_WIN32(ERROR_SERVICE_DISABLED)) { + skip("Needed Service is disabled\n"); + return; + } ok(hres == S_OK, "CoCreateInstance failed: %08x\n", hres); if(hres != S_OK) { skip("Unable to create bits instance.\n"); @@ -203,6 +215,7 @@ BOOL found = FALSE;
hres = IEnumBackgroundCopyJobs_GetCount(enumJobs, &n); + ok(hres == S_OK, "GetCount failed: %08x\n", hres); for (i = 0; i < n && !found; ++i) { LPWSTR name; @@ -214,6 +227,7 @@ IBackgroundCopyJob_Release(job); } hres = IEnumBackgroundCopyJobs_Release(enumJobs); + ok(hres == S_OK, "Release failed: %08x\n", hres); ok(found, "Adding a job in another process failed\n"); }
Modified: trunk/rostests/winetests/qmgr/testlist.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/qmgr/testlist.c?... ============================================================================== --- trunk/rostests/winetests/qmgr/testlist.c [iso-8859-1] (original) +++ trunk/rostests/winetests/qmgr/testlist.c [iso-8859-1] Sun Jun 16 11:10:56 2013 @@ -1,10 +1,7 @@ /* Automatically generated file; DO NOT EDIT!! */
-#define WIN32_LEAN_AND_MEAN -#include <windows.h> - #define STANDALONE -#include "wine/test.h" +#include <wine/test.h>
extern void func_enum_files(void); extern void func_enum_jobs(void);