58#define DIR_3 s_win_dir
59#define DIR_4 "(invalid)"
93 { __LINE__,
FALSE,
"C:\\notepad.exe",
DIR_0,
"" },
94 { __LINE__,
FALSE,
"C:\\notepad.exe",
DIR_1,
"" },
95 { __LINE__,
FALSE,
"C:\\notepad.exe",
DIR_2,
"" },
96 { __LINE__,
FALSE,
"C:\\notepad.exe",
DIR_3,
"" },
97 { __LINE__,
FALSE,
"C:\\notepad.exe",
DIR_4,
"" },
98 { __LINE__,
FALSE,
"..\\notepad.exe",
DIR_0,
"" },
99 { __LINE__,
FALSE,
"..\\notepad.exe",
DIR_1,
"" },
100 { __LINE__,
FALSE,
"..\\notepad.exe",
DIR_2,
"" },
101 { __LINE__,
FALSE,
"..\\notepad.exe",
DIR_3,
"" },
102 { __LINE__,
FALSE,
"..\\notepad.exe",
DIR_4,
"" },
103 { __LINE__,
FALSE,
".\\notepad.exe",
DIR_0,
"" },
104 { __LINE__,
FALSE,
".\\notepad.exe",
DIR_1,
"" },
105 { __LINE__,
FALSE,
".\\notepad.exe",
DIR_2,
"" },
107 { __LINE__,
FALSE,
".\\notepad.exe",
DIR_4,
"" },
108 { __LINE__,
FALSE,
"system32\\notepad.exe",
DIR_0,
"" },
109 { __LINE__,
FALSE,
"system32\\notepad.exe",
DIR_1,
"" },
110 { __LINE__,
FALSE,
"system32\\notepad.exe",
DIR_2,
"" },
112 { __LINE__,
FALSE,
"system32\\notepad.exe",
DIR_4,
"" },
123 { __LINE__,
FALSE,
" test program",
DIR_0,
"" },
124 { __LINE__,
FALSE,
" test program",
DIR_1,
"" },
125 { __LINE__,
FALSE,
" test program",
DIR_2,
"" },
126 { __LINE__,
FALSE,
" test program",
DIR_3,
"" },
127 { __LINE__,
FALSE,
" test program",
DIR_4,
"" },
128 { __LINE__,
FALSE,
"test program ",
DIR_0,
"" },
129 { __LINE__,
FALSE,
"test program ",
DIR_1,
"" },
130 { __LINE__,
FALSE,
"test program ",
DIR_2,
"" },
131 { __LINE__,
FALSE,
"test program ",
DIR_3,
"" },
132 { __LINE__,
FALSE,
"test program ",
DIR_4,
"" },
148 { __LINE__,
FALSE,
"\"test program.exe \"",
DIR_0,
"" },
149 { __LINE__,
FALSE,
"\"test program.exe \"",
DIR_1,
"" },
150 { __LINE__,
FALSE,
"\"test program.exe \"",
DIR_2,
"" },
151 { __LINE__,
FALSE,
"\"test program.exe \"",
DIR_3,
"" },
152 { __LINE__,
FALSE,
"\"test program.exe \"",
DIR_4,
"" },
153 { __LINE__,
FALSE,
"\" test program.exe\"",
DIR_0,
"" },
154 { __LINE__,
FALSE,
"\" test program.exe\"",
DIR_1,
"" },
155 { __LINE__,
FALSE,
"\" test program.exe\"",
DIR_2,
"" },
156 { __LINE__,
FALSE,
"\" test program.exe\"",
DIR_3,
"" },
157 { __LINE__,
FALSE,
"\" test program.exe\"",
DIR_4,
"" },
163 { __LINE__,
FALSE,
" test program.bat ",
DIR_0,
"" },
164 { __LINE__,
FALSE,
" test program.bat ",
DIR_1,
"" },
165 { __LINE__,
FALSE,
" test program.bat ",
DIR_2,
"" },
166 { __LINE__,
FALSE,
" test program.bat ",
DIR_3,
"" },
167 { __LINE__,
FALSE,
" test program.bat ",
DIR_4,
"" },
174 { __LINE__,
TRUE,
"shell32_apitest_sub.exe",
DIR_1,
"shell32_apitest_sub.exe" },
175 { __LINE__,
FALSE,
"shell32_apitest_sub.exe",
DIR_2,
"" },
176 { __LINE__,
FALSE,
"shell32_apitest_sub.exe",
DIR_3,
"" },
177 { __LINE__,
FALSE,
"shell32_apitest_sub.exe",
DIR_4,
"" },
183 { __LINE__,
FALSE,
"invalid file.txt",
DIR_0,
"" },
184 { __LINE__,
FALSE,
"invalid file.txt",
DIR_1,
"" },
185 { __LINE__,
FALSE,
"invalid file.txt",
DIR_2,
"" },
186 { __LINE__,
FALSE,
"invalid file.txt",
DIR_3,
"" },
187 { __LINE__,
FALSE,
"invalid file.txt",
DIR_4,
"" },
200 "Line %u: result expected '%s', got '%s'\n",
208 skip(
"shell32_apitest_sub.exe not found\n");
216 skip(
"Don't use this program at root directory\n");
233 skip(
"Please retry with admin rights\n");
static char s_win_dir[MAX_PATH]
static char s_win_txt_file[MAX_PATH]
static char s_sub_program[MAX_PATH]
static char s_win_bat_file[MAX_PATH]
static void DoTestEntry(const TEST_ENTRY *pEntry)
static const TEST_ENTRY s_entries[]
static char s_win_test_exe[MAX_PATH]
static char s_sys_bat_file[MAX_PATH]
static char s_sys_txt_file[MAX_PATH]
static char s_win_notepad[MAX_PATH]
static char s_sys_test_exe[MAX_PATH]
struct TEST_ENTRY TEST_ENTRY
static char s_sys_notepad[MAX_PATH]
static BOOL GetSubProgramPath(void)
#define ok_int(expression, result)
BOOL WINAPI CopyFileA(IN LPCSTR lpExistingFileName, IN LPCSTR lpNewFileName, IN BOOL bFailIfExists)
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
DWORD WINAPI GetModuleFileNameA(HINSTANCE hModule, LPSTR lpFilename, DWORD nSize)
DWORD WINAPI GetCurrentDirectoryA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
UINT WINAPI GetWindowsDirectoryA(OUT LPSTR lpBuffer, IN UINT uSize)
DWORD WINAPI GetLongPathNameA(IN LPCSTR lpszShortPath, OUT LPSTR lpszLongPath, IN DWORD cchBuffer)
UINT WINAPI GetSystemDirectoryA(OUT LPSTR lpBuffer, IN UINT uSize)
BOOL WINAPI PathRemoveFileSpecA(LPSTR lpszPath)
BOOL WINAPI PathFileExistsA(LPCSTR lpszPath)
BOOL WINAPI PathIsRootA(LPCSTR lpszPath)
BOOL WINAPI PathAppendA(LPSTR lpszPath, LPCSTR lpszAppend)
_Check_return_ _CRTIMP FILE *__cdecl fopen(_In_z_ const char *_Filename, _In_z_ const char *_Mode)
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
int WINAPI lstrcmpiA(LPCSTR lpString1, LPCSTR lpString2)
static HWND DoWaitForWindow(LPCWSTR clsname, LPCWSTR text, BOOL bClosing, BOOL bForce)
HINSTANCE WINAPI FindExecutableA(LPCSTR lpFile, LPCSTR lpDirectory, LPSTR lpResult)