Author: akhaldi
Date: Mon May 11 12:58:10 2015
New Revision: 67661
URL:
http://svn.reactos.org/svn/reactos?rev=67661&view=rev
Log:
[WTSAPI32_WINETEST] Import from Wine Staging 1.7.37. CORE-9246
Added:
trunk/rostests/winetests/wtsapi32/ (with props)
trunk/rostests/winetests/wtsapi32/CMakeLists.txt (with props)
trunk/rostests/winetests/wtsapi32/testlist.c (with props)
trunk/rostests/winetests/wtsapi32/wtsapi.c (with props)
Modified:
trunk/rostests/winetests/CMakeLists.txt
Modified: trunk/rostests/winetests/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/CMakeLists.txt?…
==============================================================================
--- trunk/rostests/winetests/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/rostests/winetests/CMakeLists.txt [iso-8859-1] Mon May 11 12:58:10 2015
@@ -119,6 +119,7 @@
add_subdirectory(ws2_32)
add_subdirectory(wscript)
add_subdirectory(wshom)
+add_subdirectory(wtsapi32)
add_subdirectory(xcopy)
add_subdirectory(xinput1_3)
add_subdirectory(xmllite)
Propchange: trunk/rostests/winetests/wtsapi32/
------------------------------------------------------------------------------
--- bugtraq:logregex (added)
+++ bugtraq:logregex Mon May 11 12:58:10 2015
@@ -0,0 +1,2 @@
+([Ii]ssue|[Bb]ug)s? #?(\d+)(,? ?#?(\d+))*(,? ?(and |or )?#?(\d+))?
+(\d+)
Propchange: trunk/rostests/winetests/wtsapi32/
------------------------------------------------------------------------------
bugtraq:message = See issue #%BUGID% for more details.
Propchange: trunk/rostests/winetests/wtsapi32/
------------------------------------------------------------------------------
bugtraq:url =
http://www.reactos.org/bugzilla/show_bug.cgi?id=%BUGID%
Added: trunk/rostests/winetests/wtsapi32/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/wtsapi32/CMakeL…
==============================================================================
--- trunk/rostests/winetests/wtsapi32/CMakeLists.txt (added)
+++ trunk/rostests/winetests/wtsapi32/CMakeLists.txt [iso-8859-1] Mon May 11 12:58:10
2015
@@ -0,0 +1,6 @@
+
+add_definitions(-DUSE_WINE_TODOS)
+add_executable(wtsapi32_winetest wtsapi.c testlist.c)
+set_module_type(wtsapi32_winetest win32cui)
+add_importlibs(wtsapi32_winetest wtsapi32 msvcrt kernel32)
+add_cd_file(TARGET wtsapi32_winetest DESTINATION reactos/bin FOR all)
Propchange: trunk/rostests/winetests/wtsapi32/CMakeLists.txt
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/rostests/winetests/wtsapi32/testlist.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/wtsapi32/testli…
==============================================================================
--- trunk/rostests/winetests/wtsapi32/testlist.c (added)
+++ trunk/rostests/winetests/wtsapi32/testlist.c [iso-8859-1] Mon May 11 12:58:10 2015
@@ -0,0 +1,12 @@
+/* Automatically generated by make depend; DO NOT EDIT!! */
+
+#define STANDALONE
+#include <wine/test.h>
+
+extern void func_wtsapi(void);
+
+const struct test winetest_testlist[] =
+{
+ { "wtsapi", func_wtsapi },
+ { 0, 0 }
+};
Propchange: trunk/rostests/winetests/wtsapi32/testlist.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/rostests/winetests/wtsapi32/wtsapi.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/wtsapi32/wtsapi…
==============================================================================
--- trunk/rostests/winetests/wtsapi32/wtsapi.c (added)
+++ trunk/rostests/winetests/wtsapi32/wtsapi.c [iso-8859-1] Mon May 11 12:58:10 2015
@@ -0,0 +1,95 @@
+/*
+ * Copyright 2014 Stefan Leichter
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <stdarg.h>
+#include <stdlib.h>
+#include <windef.h>
+#include <winbase.h>
+#include <wine/winternl.h>
+#include <wtsapi32.h>
+
+#include "wine/test.h"
+
+static void test_WTSEnumerateProcessesW(void)
+{
+ BOOL found = FALSE, ret;
+ DWORD count, i;
+ PWTS_PROCESS_INFOW info;
+ WCHAR *pname, nameW[MAX_PATH];
+
+ GetModuleFileNameW(NULL, nameW, MAX_PATH);
+ for (pname = nameW + lstrlenW(nameW); pname > nameW; pname--)
+ {
+ if(*pname == '/' || *pname == '\\')
+ {
+ pname++;
+ break;
+ }
+ }
+
+ info = NULL;
+ SetLastError(0xdeadbeef);
+ ret = WTSEnumerateProcessesW(WTS_CURRENT_SERVER_HANDLE, 1, 1, &info,
&count);
+ ok(!ret, "expected WTSEnumerateProcessesW to fail\n");
+ ok(GetLastError()== ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER
got: %d\n", GetLastError());
+ if (info) WTSFreeMemory(info);
+
+ info = NULL;
+ SetLastError(0xdeadbeef);
+ ret = WTSEnumerateProcessesW(WTS_CURRENT_SERVER_HANDLE, 0, 0, &info,
&count);
+ ok(!ret, "expected WTSEnumerateProcessesW to fail\n");
+ ok(GetLastError()== ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER
got: %d\n", GetLastError());
+ if (info) WTSFreeMemory(info);
+
+ info = NULL;
+ SetLastError(0xdeadbeef);
+ ret = WTSEnumerateProcessesW(WTS_CURRENT_SERVER_HANDLE, 0, 2, &info,
&count);
+ ok(!ret, "expected WTSEnumerateProcessesW to fail\n");
+ ok(GetLastError()== ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER
got: %d\n", GetLastError());
+ if (info) WTSFreeMemory(info);
+
+ SetLastError(0xdeadbeef);
+ ret = WTSEnumerateProcessesW(WTS_CURRENT_SERVER_HANDLE, 0, 1, NULL, &count);
+ ok(!ret, "expected WTSEnumerateProcessesW to fail\n");
+ ok(GetLastError()== ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER
got: %d\n", GetLastError());
+
+ info = NULL;
+ SetLastError(0xdeadbeef);
+ ret = WTSEnumerateProcessesW(WTS_CURRENT_SERVER_HANDLE, 0, 1, &info, NULL);
+ ok(!ret, "expected WTSEnumerateProcessesW to fail\n");
+ ok(GetLastError()== ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER
got: %d\n", GetLastError());
+ if (info) WTSFreeMemory(info);
+
+ count = 0;
+ info = NULL;
+ SetLastError(0xdeadbeef);
+ ret = WTSEnumerateProcessesW(WTS_CURRENT_SERVER_HANDLE, 0, 1, &info,
&count);
+ ok(ret || broken(!ret), /* fails on Win2K with error ERROR_APP_WRONG_OS */
+ "expected WTSEnumerateProcessesW to succeed; failed with %d\n",
GetLastError());
+ for(i = 0; ret && i < count; i++)
+ {
+ found = found || !lstrcmpW(pname, info[i].pProcessName);
+ }
+ ok(found || broken(!ret), "process name %s not found\n",
wine_dbgstr_w(pname));
+ if (info) WTSFreeMemory(info);
+}
+
+START_TEST (wtsapi)
+{
+ test_WTSEnumerateProcessesW();
+}
Propchange: trunk/rostests/winetests/wtsapi32/wtsapi.c
------------------------------------------------------------------------------
svn:eol-style = native