#include "wine/test.h"
#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <io.h>
#include <windef.h>
#include <winbase.h>
#include <winnls.h>
#include <process.h>
#include <errno.h>
#include <direct.h>
Go to the source code of this file.
◆ initterm_test
Value:
Definition at line 51 of file data.c.
◆ _INITTERMFUN
◆ __getmainargs()
Definition at line 182 of file getargs.c.
184 int i, doexpand, slashesAdded, escapedQuote, inQuotes,
bufferIndex, anyLetter;
191 doexpand = expand_wildcards;
192 escapedQuote =
FALSE;
233 escapedQuote =
FALSE;
244 escapedQuote =
FALSE;
250 if (slashesAdded > 0)
252 if (slashesAdded % 2 == 0)
274 else if (!inQuotes &&
i > 0 &&
_acmdln[
i - 1] ==
'\"' && !escapedQuote)
282 escapedQuote =
FALSE;
283 inQuotes = !inQuotes;
284 doexpand = inQuotes ?
FALSE : expand_wildcards;
291 escapedQuote =
FALSE;
ACPI_SIZE strlen(const char *String)
BOOL WINAPI HeapValidate(HANDLE hHeap, DWORD dwFlags, LPCVOID lpMem)
DWORD WINAPI GetModuleFileNameA(HINSTANCE hModule, LPSTR lpFilename, DWORD nSize)
int aexpand(char *name, int expand_wildcards)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
char * strndup(char const *name, size_t len)
static LPCWSTR LPCWSTR LPCWSTR env
Referenced by test___getmainargs().
◆ initcallback()
◆ int()
static int |
( |
__cdecl * |
p_get_pgmptr | ) |
|
|
static |
◆ p___p___argc()
◆ p___p___argv()
◆ START_TEST()
Definition at line 230 of file data.c.
static void test_get_pgmptr(void)
static void test_initterm(void)
static void test___getmainargs(void)
static int *__cdecl * p___p___argc(void)
static char ***__cdecl * p___p___argv(void)
int winetest_get_mainargs(char ***pargv)
static void test___getmainargs_parent(char *name)
static void test_initvar(HMODULE hmsvcrt)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
#define GetProcAddress(x, y)
◆ test___getmainargs()
Definition at line 132 of file data.c.
135 char **
argv, **new_argv, **envp;
145 sprintf(filepath,
"%s*\\*", tmppath);
147 sprintf(filepath,
"%swine_test/*", tmppath);
149 ok(!
argv[4],
"argv[4] != NULL\n");
154 ok(new_argc == 4,
"*__p___argc() = %d\n", new_argc);
155 ok(new_argv ==
argv,
"*__p___argv() = %p, expected %p\n", new_argv,
argv);
157 else skip(
"__p___argc or __p___argv is not available\n");
163 sprintf(filepath,
"%s*\\*", tmppath);
165 sprintf(filepath,
"%swine_test/a", tmppath);
168 sprintf(filepath,
"%swine_test/test", tmppath);
172 sprintf(filepath,
"%swine_test/test", tmppath);
175 ok(!
argv[5],
"argv[5] != NULL\n");
180 ok(new_argc ==
argc,
"*__p___argc() = %d, expected %d\n", new_argc,
argc);
181 ok(new_argv ==
argv,
"*__p___argv() = %p, expected %p\n", new_argv,
argv);
184 sprintf(filepath,
"%swine_test/b", tmppath);
186 ok(
f !=
NULL,
"fopen(%s) failed: %d\n", filepath,
errno);
190 ok(new_argc ==
argc+1,
"new_argc = %d, expected %d\n", new_argc,
argc+1);
ACPI_SIZE strlen(const char *String)
#define sprintf(buf, format,...)
static int *__cdecl * p___p___argc(void)
_Check_return_ _CRTIMP int __cdecl _unlink(_In_z_ const char *_Filename)
static char ***__cdecl * p___p___argv(void)
void __cdecl __getmainargs(int *, char ***, char ***, int, int *)
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
_Check_return_ _CRTIMP FILE *__cdecl fopen(_In_z_ const char *_Filename, _In_z_ const char *_Mode)
DWORD WINAPI GetTempPathA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
int strcmp(const char *String1, const char *String2)
Referenced by START_TEST().
◆ test___getmainargs_parent()
static void test___getmainargs_parent |
( |
char * |
name | ) |
|
|
static |
Definition at line 194 of file data.c.
206 sprintf(filepath,
"%swine_test", tmppath);
209 sprintf(filepath,
"%swine_test\\a", tmppath);
211 ok(
f !=
NULL,
"fopen(%s) failed: %d\n", filepath,
errno);
213 sprintf(filepath,
"%swine_test\\test", tmppath);
215 ok(
f !=
NULL,
"fopen(%s) failed: %d\n", filepath,
errno);
224 sprintf(filepath,
"%swine_test\\a", tmppath);
226 sprintf(filepath,
"%swine_test", tmppath);
int startup(int argc, const char *argv[])
#define CREATE_DEFAULT_ERROR_MODE
#define NORMAL_PRIORITY_CLASS
#define sprintf(buf, format,...)
_Check_return_ _CRTIMP int __cdecl _rmdir(_In_z_ const char *_Path)
_Check_return_ _CRTIMP int __cdecl _unlink(_In_z_ const char *_Filename)
BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessA(LPCSTR lpApplicationName, LPSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCSTR lpCurrentDirectory, LPSTARTUPINFOA lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation)
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
_Check_return_ _CRTIMP FILE *__cdecl fopen(_In_z_ const char *_Filename, _In_z_ const char *_Mode)
void winetest_wait_child_process(HANDLE process)
DWORD WINAPI GetTempPathA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
_Check_return_ _CRTIMP int __cdecl _mkdir(_In_z_ const char *_Path)
Referenced by START_TEST().
◆ test_get_pgmptr()
Definition at line 118 of file data.c.
126 res = p_get_pgmptr(&pgm);
128 ok(
res == 0,
"Wrong _get_pgmptr return value %d expected 0\n",
res);
129 ok( pgm !=
NULL,
"_get_pgmptr returned a NULL pointer\n" );
Referenced by START_TEST().
◆ test_initterm()
Definition at line 56 of file data.c.
64 for (
i = 0;
i < 4;
i++)
#define initterm_test(start, end, expected)
void(__cdecl * _INITTERMFUN)(void)
static void __cdecl initcallback(void)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Referenced by START_TEST().
◆ test_initvar()
Definition at line 77 of file data.c.
85 unsigned int winver, winmajor, winminor, osver, osplatform;
87 if( !( pp_winmajor && pp_winminor && pp_winver)) {
88 win_skip(
"_winver variables are not available\n");
92 winminor = *pp_winminor;
93 winmajor = *pp_winmajor;
100 "Wrong value for _winver %02x expected %02x\n",
102 if( !pp_osver || !pp_osplatform ) {
103 win_skip(
"_osver variables are not available\n");
107 osplatform = *pp_osplatform;
111 "Wrong value for _osver %04x expected %04x\n",
114 "Wrong value for _osplatform %x expected %x\n",
BOOL WINAPI GetVersionExA(IN LPOSVERSIONINFOA lpVersionInformation)
struct _OSVERSIONINFOA OSVERSIONINFOA
#define GetProcAddress(x, y)
Referenced by START_TEST().
◆ void()
◆ callbacked
◆ end