1c2c66affSColin Finck /*
2c2c66affSColin Finck  * PROJECT:         ReactOS api tests
3c2c66affSColin Finck  * LICENSE:         GPLv2+ - See COPYING in the top level directory
4c2c66affSColin Finck  * PURPOSE:         Tests for PathResolve
5c2c66affSColin Finck  * PROGRAMMER:      Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
6c2c66affSColin Finck  */
7c2c66affSColin Finck 
8c2c66affSColin Finck #include "shelltest.h"
98ed8eec1SAmine Khaldi 
1083e690cdSKatayama Hirofumi MZ #include <stdio.h>
11c2c66affSColin Finck #include <assert.h>
12c2c66affSColin Finck 
13c2c66affSColin Finck /*
14c2c66affSColin Finck  * NOTE: "App Paths" registry key and PATHEXT environment variable
15c2c66affSColin Finck  *       have no effect for PathResolve.
16c2c66affSColin Finck  */
17c2c66affSColin Finck 
18c2c66affSColin Finck /* PathResolve */
19c2c66affSColin Finck typedef int (WINAPI *PATHRESOLVE)(LPWSTR, LPWSTR*, UINT);
20c2c66affSColin Finck 
2183e690cdSKatayama Hirofumi MZ /* IsLFNDriveW */
2283e690cdSKatayama Hirofumi MZ typedef BOOL (WINAPI *ISLFNDRIVEW)(LPCWSTR);
2383e690cdSKatayama Hirofumi MZ 
24c2c66affSColin Finck static HINSTANCE    s_hShell32 = NULL;
25c2c66affSColin Finck static PATHRESOLVE  s_pPathResolve = NULL;
2683e690cdSKatayama Hirofumi MZ static ISLFNDRIVEW  s_pIsLFNDriveW = NULL;
2783e690cdSKatayama Hirofumi MZ static WCHAR        s_TestDir[MAX_PATH];
28a17664ceSKatayama Hirofumi MZ static WCHAR        s_TestDirWithBackslash[MAX_PATH];
2983e690cdSKatayama Hirofumi MZ static WCHAR        s_ShortcutLongName[MAX_PATH];
3083e690cdSKatayama Hirofumi MZ static WCHAR        s_LinkTarget[MAX_PATH];
31a17664ceSKatayama Hirofumi MZ static WCHAR        s_LinkTargetWithBackslash[MAX_PATH];
32346d12bcSKatayama Hirofumi MZ static WCHAR        s_LinkTargetDoubleBackslash[MAX_PATH];
3383e690cdSKatayama Hirofumi MZ static LPWSTR       s_Dirs[2] = { s_TestDir, NULL };
34a17664ceSKatayama Hirofumi MZ static LPWSTR       s_DirsWithBackslash[2] = { s_TestDirWithBackslash, NULL };
35c2c66affSColin Finck 
36c2c66affSColin Finck /* PathResolve flags */
37c2c66affSColin Finck #ifndef PRF_VERIFYEXISTS
38c2c66affSColin Finck     #define PRF_VERIFYEXISTS         0x01
39c2c66affSColin Finck     #define PRF_EXECUTABLE           0x02
40c2c66affSColin Finck     #define PRF_TRYPROGRAMEXTENSIONS (PRF_EXECUTABLE | PRF_VERIFYEXISTS)
41c2c66affSColin Finck     #define PRF_FIRSTDIRDEF          0x04
42c2c66affSColin Finck     #define PRF_DONTFINDLNK          0x08
43c2c66affSColin Finck #endif
44c2c66affSColin Finck #ifndef PRF_REQUIREABSOLUTE
45c2c66affSColin Finck     #define PRF_REQUIREABSOLUTE      0x10
46c2c66affSColin Finck #endif
47c2c66affSColin Finck 
4883e690cdSKatayama Hirofumi MZ /* Abstraction of PathResolve flags to manage the test entries */
49c2c66affSColin Finck #define FLAGS0      0
50c2c66affSColin Finck #define FLAGS1      PRF_VERIFYEXISTS
51c2c66affSColin Finck #define FLAGS2      PRF_EXECUTABLE
52c2c66affSColin Finck #define FLAGS3      PRF_TRYPROGRAMEXTENSIONS
53c2c66affSColin Finck #define FLAGS4      (PRF_FIRSTDIRDEF | PRF_VERIFYEXISTS)
54c2c66affSColin Finck #define FLAGS5      (PRF_FIRSTDIRDEF | PRF_EXECUTABLE)
55c2c66affSColin Finck #define FLAGS6      (PRF_FIRSTDIRDEF | PRF_TRYPROGRAMEXTENSIONS)
56c2c66affSColin Finck #define FLAGS7      (PRF_REQUIREABSOLUTE | PRF_VERIFYEXISTS)
57c2c66affSColin Finck #define FLAGS8      (PRF_REQUIREABSOLUTE | PRF_EXECUTABLE)
58c2c66affSColin Finck #define FLAGS9      (PRF_REQUIREABSOLUTE | PRF_TRYPROGRAMEXTENSIONS)
59c2c66affSColin Finck #define FLAGS10     (PRF_REQUIREABSOLUTE | PRF_FIRSTDIRDEF | PRF_VERIFYEXISTS)
60c2c66affSColin Finck #define FLAGS11     (PRF_REQUIREABSOLUTE | PRF_FIRSTDIRDEF | PRF_EXECUTABLE)
61c2c66affSColin Finck #define FLAGS12     (PRF_REQUIREABSOLUTE | PRF_FIRSTDIRDEF | PRF_TRYPROGRAMEXTENSIONS)
62c2c66affSColin Finck #define FLAGS13     0xFFFFFFFF
63c2c66affSColin Finck 
6483e690cdSKatayama Hirofumi MZ /* The test entry structure */
6583e690cdSKatayama Hirofumi MZ typedef struct tagTEST_ENTRY
66c2c66affSColin Finck {
6783e690cdSKatayama Hirofumi MZ     INT         LineNumber;    /* # */
68c2c66affSColin Finck     INT         Ret;
69c2c66affSColin Finck     DWORD       Error;
70c2c66affSColin Finck     UINT        EF_;
71c2c66affSColin Finck     LPCWSTR     NameBefore;
72c2c66affSColin Finck     LPCWSTR     NameExpected;
73c2c66affSColin Finck     UINT        Flags;
74c2c66affSColin Finck     LPWSTR     *Dirs;
7583e690cdSKatayama Hirofumi MZ } TEST_ENTRY, *PTEST_ENTRY;
76c2c66affSColin Finck 
7783e690cdSKatayama Hirofumi MZ /* Flags for TEST_ENTRY */
7883e690cdSKatayama Hirofumi MZ #define EF_FULLPATH     0x01
7983e690cdSKatayama Hirofumi MZ #define EF_TESTDATA     0x02
8083e690cdSKatayama Hirofumi MZ #define EF_TYPE_MASK    0x0F
8183e690cdSKatayama Hirofumi MZ #define EF_NAME_ONLY    0x10
8283e690cdSKatayama Hirofumi MZ #define EF_APP_PATH     0x20
8383e690cdSKatayama Hirofumi MZ 
8402d92979SKatayama Hirofumi MZ #define RET_IGNORE 0x00BEF00D
8502d92979SKatayama Hirofumi MZ 
8683e690cdSKatayama Hirofumi MZ /* Special error codes */
8783e690cdSKatayama Hirofumi MZ #define ERR_NO_CHANGE 0xBEEF      /* Error Code 48879 */
8883e690cdSKatayama Hirofumi MZ #define ERR_DEAD      0xDEAD      /* Error Code 57005 */
8983e690cdSKatayama Hirofumi MZ #define ERR_IGNORE    0x7F7F7F7F  /* Ignore Error Code */
90c2c66affSColin Finck #define RAISED        9999        /* exception raised */
91c2c66affSColin Finck 
9283e690cdSKatayama Hirofumi MZ /* The test entries for long file name (LFN) */
9383e690cdSKatayama Hirofumi MZ static const TEST_ENTRY s_LFNEntries[] =
94c2c66affSColin Finck {
95c2c66affSColin Finck     /* null path */
9683e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_FULLPATH, NULL, NULL, FLAGS0 },
9783e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_FULLPATH, NULL, NULL, FLAGS1 },
9883e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_FULLPATH, NULL, NULL, FLAGS2 },
9983e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_FULLPATH, NULL, NULL, FLAGS3 },
10083e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_FULLPATH, NULL, NULL, FLAGS4 },
10183e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_FULLPATH, NULL, NULL, FLAGS5 },
10283e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_FULLPATH, NULL, NULL, FLAGS6 },
10383e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_FULLPATH, NULL, NULL, FLAGS7 },
10483e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_FULLPATH, NULL, NULL, FLAGS8 },
10583e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_FULLPATH, NULL, NULL, FLAGS9 },
10683e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_FULLPATH, NULL, NULL, FLAGS10 },
10783e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_FULLPATH, NULL, NULL, FLAGS11 },
10883e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_FULLPATH, NULL, NULL, FLAGS12 },
10983e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_FULLPATH, NULL, NULL, FLAGS13 },
110c2c66affSColin Finck     /* empty path */
11183e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_FULLPATH, L"", NULL, FLAGS0 },
112a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_IGNORE, EF_FULLPATH, L"", NULL, FLAGS1 },
113a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_IGNORE, EF_FULLPATH, L"", NULL, FLAGS2 },
114a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_IGNORE, EF_FULLPATH, L"", NULL, FLAGS3 },
115a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_IGNORE, EF_FULLPATH, L"", NULL, FLAGS4 },
116a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_IGNORE, EF_FULLPATH, L"", NULL, FLAGS5 },
117a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_IGNORE, EF_FULLPATH, L"", NULL, FLAGS6 },
118a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_IGNORE, EF_FULLPATH, L"", NULL, FLAGS7 },
119a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_IGNORE, EF_FULLPATH, L"", NULL, FLAGS8 },
120a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_IGNORE, EF_FULLPATH, L"", NULL, FLAGS9 },
121a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_IGNORE, EF_FULLPATH, L"", NULL, FLAGS10 },
122a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_IGNORE, EF_FULLPATH, L"", NULL, FLAGS11 },
123a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_IGNORE, EF_FULLPATH, L"", NULL, FLAGS12 },
124a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_IGNORE, EF_FULLPATH, L"", NULL, FLAGS13 },
125c2c66affSColin Finck     /* invalid name */
12683e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L"invalid name", L"invalid name", FLAGS0 },
12783e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L"invalid name", L"invalid name", FLAGS1 },
12883e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L"invalid name", L"invalid name", FLAGS2 },
12983e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L"invalid name", L"invalid name", FLAGS3 },
13083e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L"invalid name", L"invalid name", FLAGS4 },
13183e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L"invalid name", L"invalid name", FLAGS5 },
13283e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L"invalid name", L"invalid name", FLAGS6 },
13383e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L"invalid name", L"invalid name", FLAGS7 },
13483e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L"invalid name", L"invalid name", FLAGS8 },
13583e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L"invalid name", L"invalid name", FLAGS9 },
13683e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L"invalid name", L"invalid name", FLAGS10 },
13783e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L"invalid name", L"invalid name", FLAGS11 },
13883e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L"invalid name", L"invalid name", FLAGS12 },
13983e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L"invalid name", L"invalid name", FLAGS13 },
140a17664ceSKatayama Hirofumi MZ     /* testdir/2PRONG (path) */
14183e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_TESTDATA, L"2PRONG", L"2PRONG", FLAGS0 },
14283e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA, L"2PRONG", L"2PRONG", FLAGS1 },
14383e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_TESTDATA, L"2PRONG", L"2PRONG", FLAGS2 },
14483e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA, L"2PRONG", L"2PRONG", FLAGS3 },
14583e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_TESTDATA, L"2PRONG", L"2PRONG", FLAGS4 },
14683e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_TESTDATA, L"2PRONG", L"2PRONG", FLAGS5 },
14783e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_TESTDATA, L"2PRONG", L"2PRONG", FLAGS6 },
14883e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA, L"2PRONG", L"2PRONG", FLAGS7 },
14983e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_TESTDATA, L"2PRONG", L"2PRONG", FLAGS8 },
15083e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA, L"2PRONG", L"2PRONG", FLAGS9 },
15183e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_TESTDATA, L"2PRONG", L"2PRONG", FLAGS10 },
15283e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_TESTDATA, L"2PRONG", L"2PRONG", FLAGS11 },
15383e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_TESTDATA, L"2PRONG", L"2PRONG", FLAGS12 },
15483e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_TESTDATA, L"2PRONG", L"2PRONG", FLAGS13 },
155a17664ceSKatayama Hirofumi MZ     /* testdir/2PRONG (name only) */
15683e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG", NULL, FLAGS0 },
15783e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG", NULL, FLAGS1 },
15883e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG", NULL, FLAGS2 },
15983e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG", NULL, FLAGS3 },
16083e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG", NULL, FLAGS4 },
16183e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG", NULL, FLAGS5 },
16283e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG", NULL, FLAGS6 },
16383e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG", NULL, FLAGS7 },
16483e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG", NULL, FLAGS8 },
16583e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG", NULL, FLAGS9 },
16683e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG", NULL, FLAGS10 },
16783e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG", NULL, FLAGS11 },
16883e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG", NULL, FLAGS12 },
16983e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG", NULL, FLAGS13 },
170a17664ceSKatayama Hirofumi MZ     /* testdir/2PRONG with dirs (name only) */
17183e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG", NULL, FLAGS0, s_Dirs },
17283e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG", NULL, FLAGS1, s_Dirs },
17383e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG", NULL, FLAGS2, s_Dirs },
17483e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG", NULL, FLAGS3, s_Dirs },
17583e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG", NULL, FLAGS4, s_Dirs },
17683e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG", NULL, FLAGS5, s_Dirs },
17783e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG", NULL, FLAGS6, s_Dirs },
17883e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG", NULL, FLAGS7, s_Dirs },
17983e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG", NULL, FLAGS8, s_Dirs },
18083e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG", NULL, FLAGS9, s_Dirs },
18183e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG", NULL, FLAGS10, s_Dirs },
18283e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG", NULL, FLAGS11, s_Dirs },
18383e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG", NULL, FLAGS12, s_Dirs },
18483e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG", NULL, FLAGS13, s_Dirs },
185a17664ceSKatayama Hirofumi MZ     /* testdir/2PRONG (name only, app path) */
18683e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY | EF_APP_PATH, L"2PRONG", L"2PRONG", FLAGS0 },
18783e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY | EF_APP_PATH, L"2PRONG", L"2PRONG", FLAGS1 },
18883e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY | EF_APP_PATH, L"2PRONG", L"2PRONG", FLAGS2 },
18983e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY | EF_APP_PATH, L"2PRONG", L"2PRONG", FLAGS3 },
19083e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY | EF_APP_PATH, L"2PRONG", L"2PRONG", FLAGS4 },
19183e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY | EF_APP_PATH, L"2PRONG", L"2PRONG", FLAGS5 },
19283e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY | EF_APP_PATH, L"2PRONG", L"2PRONG", FLAGS6 },
19383e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY | EF_APP_PATH, L"2PRONG", L"2PRONG", FLAGS7 },
19483e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY | EF_APP_PATH, L"2PRONG", L"2PRONG", FLAGS8 },
19583e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY | EF_APP_PATH, L"2PRONG", L"2PRONG", FLAGS9 },
19683e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY | EF_APP_PATH, L"2PRONG", L"2PRONG", FLAGS10 },
19783e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY | EF_APP_PATH, L"2PRONG", L"2PRONG", FLAGS11 },
19883e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY | EF_APP_PATH, L"2PRONG", L"2PRONG", FLAGS12 },
19983e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY | EF_APP_PATH, L"2PRONG", L"2PRONG", FLAGS13 },
20083e690cdSKatayama Hirofumi MZ     /* 2PRONG.txt */
20183e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_TESTDATA, L"2PRONG.txt", L"2PRONG.txt", FLAGS0 },
20283e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_TESTDATA, L"2PRONG.txt", L"2PRONG.txt", FLAGS1 },
20383e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_TESTDATA, L"2PRONG.txt", L"2PRONG.txt", FLAGS2 },
20483e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_TESTDATA, L"2PRONG.txt", L"2PRONG.txt", FLAGS3 },
20583e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_TESTDATA, L"2PRONG.txt", L"2PRONG.txt", FLAGS4 },
20683e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_TESTDATA, L"2PRONG.txt", L"2PRONG.txt", FLAGS5 },
20783e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_TESTDATA, L"2PRONG.txt", L"2PRONG.txt", FLAGS6 },
20883e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_TESTDATA, L"2PRONG.txt", L"2PRONG.txt", FLAGS7 },
20983e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_TESTDATA, L"2PRONG.txt", L"2PRONG.txt", FLAGS8 },
21083e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_TESTDATA, L"2PRONG.txt", L"2PRONG.txt", FLAGS9 },
21183e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_TESTDATA, L"2PRONG.txt", L"2PRONG.txt", FLAGS10 },
21283e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_TESTDATA, L"2PRONG.txt", L"2PRONG.txt", FLAGS11 },
21383e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_TESTDATA, L"2PRONG.txt", L"2PRONG.txt", FLAGS12 },
21483e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_TESTDATA, L"2PRONG.txt", L"2PRONG.txt", FLAGS13 },
21583e690cdSKatayama Hirofumi MZ     /* 2PRONG.txt with dirs */
21683e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERR_IGNORE, EF_TESTDATA, L"2PRONG.txt", L"2PRONG.txt", FLAGS0, s_Dirs },
21783e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_TESTDATA, L"2PRONG.txt", L"2PRONG.txt", FLAGS1, s_Dirs },
21883e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_TESTDATA, L"2PRONG.txt", L"2PRONG.txt", FLAGS2, s_Dirs },
21983e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_TESTDATA, L"2PRONG.txt", L"2PRONG.txt", FLAGS3, s_Dirs },
22083e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_TESTDATA, L"2PRONG.txt", L"2PRONG.txt", FLAGS4, s_Dirs },
22183e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_TESTDATA, L"2PRONG.txt", L"2PRONG.txt", FLAGS5, s_Dirs },
22283e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_TESTDATA, L"2PRONG.txt", L"2PRONG.txt", FLAGS6, s_Dirs },
22383e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_TESTDATA, L"2PRONG.txt", L"2PRONG.txt", FLAGS7, s_Dirs },
22483e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_TESTDATA, L"2PRONG.txt", L"2PRONG.txt", FLAGS8, s_Dirs },
22583e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_TESTDATA, L"2PRONG.txt", L"2PRONG.txt", FLAGS9, s_Dirs },
22683e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_TESTDATA, L"2PRONG.txt", L"2PRONG.txt", FLAGS10, s_Dirs },
22783e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_TESTDATA, L"2PRONG.txt", L"2PRONG.txt", FLAGS11, s_Dirs },
22883e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_TESTDATA, L"2PRONG.txt", L"2PRONG.txt", FLAGS12, s_Dirs },
22983e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_TESTDATA, L"2PRONG.txt", L"2PRONG.txt", FLAGS13, s_Dirs },
230a17664ceSKatayama Hirofumi MZ     /* 2PRONG.txt with dirs (path) */
231a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_IGNORE, EF_FULLPATH, L"2PRONG.txt", s_LinkTarget, FLAGS0, s_Dirs },
232a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L"2PRONG.txt", s_LinkTarget, FLAGS1, s_Dirs },
233a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_FULLPATH, L"2PRONG.txt", s_LinkTarget, FLAGS2, s_Dirs },
234a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L"2PRONG.txt", s_LinkTarget, FLAGS3, s_Dirs },
235a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L"2PRONG.txt", s_LinkTarget, FLAGS4, s_Dirs },
236a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_FULLPATH, L"2PRONG.txt", s_LinkTarget, FLAGS5, s_Dirs },
237a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L"2PRONG.txt", s_LinkTarget, FLAGS6, s_Dirs },
238a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L"2PRONG.txt", s_LinkTarget, FLAGS7, s_Dirs },
239a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_FULLPATH, L"2PRONG.txt", s_LinkTarget, FLAGS8, s_Dirs },
240a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L"2PRONG.txt", s_LinkTarget, FLAGS9, s_Dirs },
241a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L"2PRONG.txt", s_LinkTarget, FLAGS10, s_Dirs },
242a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_FULLPATH, L"2PRONG.txt", s_LinkTarget, FLAGS11, s_Dirs },
243a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L"2PRONG.txt", s_LinkTarget, FLAGS12, s_Dirs },
244a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L"2PRONG.txt", s_LinkTarget, FLAGS13, s_Dirs },
245a17664ceSKatayama Hirofumi MZ     /* 2PRONG.txt (with a trailing backslash) */
246a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_FULLPATH, s_LinkTargetWithBackslash, s_LinkTarget, FLAGS0 },
247a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, s_LinkTargetWithBackslash, s_LinkTarget, FLAGS1 },
248a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_FULLPATH, s_LinkTargetWithBackslash, s_LinkTarget, FLAGS2 },
249a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, s_LinkTargetWithBackslash, s_LinkTarget, FLAGS3 },
250a17664ceSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_FULLPATH, s_LinkTargetWithBackslash, NULL, FLAGS4 },
251a17664ceSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_FULLPATH, s_LinkTargetWithBackslash, NULL, FLAGS5 },
252a17664ceSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_FULLPATH, s_LinkTargetWithBackslash, NULL, FLAGS6 },
253a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, s_LinkTargetWithBackslash, s_LinkTarget, FLAGS7 },
254a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_FULLPATH, s_LinkTargetWithBackslash, s_LinkTarget, FLAGS8 },
255a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, s_LinkTargetWithBackslash, s_LinkTarget, FLAGS9 },
256a17664ceSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_FULLPATH, s_LinkTargetWithBackslash, NULL, FLAGS10 },
257a17664ceSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_FULLPATH, s_LinkTargetWithBackslash, NULL, FLAGS11 },
258a17664ceSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_FULLPATH, s_LinkTargetWithBackslash, NULL, FLAGS12 },
259a17664ceSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_FULLPATH, s_LinkTargetWithBackslash, NULL, FLAGS13 },
260a17664ceSKatayama Hirofumi MZ     /* 2PRONG.txt with dirs (with a trailing backslash) */
261a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_IGNORE, EF_FULLPATH, s_LinkTargetWithBackslash, s_LinkTarget, FLAGS0, s_Dirs },
262a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, s_LinkTargetWithBackslash, s_LinkTarget, FLAGS1, s_Dirs },
263a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_FULLPATH, s_LinkTargetWithBackslash, s_LinkTarget, FLAGS2, s_Dirs },
264a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, s_LinkTargetWithBackslash, s_LinkTarget, FLAGS3, s_Dirs },
265a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, s_LinkTargetWithBackslash, s_LinkTarget, FLAGS4, s_Dirs },
266a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_FULLPATH, s_LinkTargetWithBackslash, s_LinkTarget, FLAGS5, s_Dirs },
267a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, s_LinkTargetWithBackslash, s_LinkTarget, FLAGS6, s_Dirs },
268a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, s_LinkTargetWithBackslash, s_LinkTarget, FLAGS7, s_Dirs },
269a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_FULLPATH, s_LinkTargetWithBackslash, s_LinkTarget, FLAGS8, s_Dirs },
270a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, s_LinkTargetWithBackslash, s_LinkTarget, FLAGS9, s_Dirs },
271a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, s_LinkTargetWithBackslash, s_LinkTarget, FLAGS10, s_Dirs },
272a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_FULLPATH, s_LinkTargetWithBackslash, s_LinkTarget, FLAGS11, s_Dirs },
273a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, s_LinkTargetWithBackslash, s_LinkTarget, FLAGS12, s_Dirs },
274a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, s_LinkTargetWithBackslash, s_LinkTarget, FLAGS13, s_Dirs },
275a17664ceSKatayama Hirofumi MZ     /* 2PRONG.txt with dirs (with a trailing backslash) */
276a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_IGNORE, EF_FULLPATH, L"2PRONG.txt", s_LinkTarget, FLAGS0, s_Dirs },
277a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L"2PRONG.txt", s_LinkTarget, FLAGS1, s_Dirs },
278a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_FULLPATH, L"2PRONG.txt", s_LinkTarget, FLAGS2, s_Dirs },
279a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L"2PRONG.txt", s_LinkTarget, FLAGS3, s_Dirs },
280a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L"2PRONG.txt", s_LinkTarget, FLAGS4, s_Dirs },
281a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_FULLPATH, L"2PRONG.txt", s_LinkTarget, FLAGS5, s_Dirs },
282a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L"2PRONG.txt", s_LinkTarget, FLAGS6, s_Dirs },
283a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L"2PRONG.txt", s_LinkTarget, FLAGS7, s_Dirs },
284a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_FULLPATH, L"2PRONG.txt", s_LinkTarget, FLAGS8, s_Dirs },
285a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L"2PRONG.txt", s_LinkTarget, FLAGS9, s_Dirs },
286a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L"2PRONG.txt", s_LinkTarget, FLAGS10, s_Dirs },
287a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_FULLPATH, L"2PRONG.txt", s_LinkTarget, FLAGS11, s_Dirs },
288a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L"2PRONG.txt", s_LinkTarget, FLAGS12, s_Dirs },
289a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L"2PRONG.txt", s_LinkTarget, FLAGS13, s_Dirs },
290a17664ceSKatayama Hirofumi MZ     /* 2PRONG.txt with dirs (with a trailing backslash) (s_DirsWithBackslash) */
291a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_IGNORE, EF_FULLPATH, s_LinkTargetWithBackslash, s_LinkTarget, FLAGS0, s_DirsWithBackslash },
292a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, s_LinkTargetWithBackslash, s_LinkTarget, FLAGS1, s_DirsWithBackslash },
293a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_FULLPATH, s_LinkTargetWithBackslash, s_LinkTarget, FLAGS2, s_DirsWithBackslash },
294a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, s_LinkTargetWithBackslash, s_LinkTarget, FLAGS3, s_DirsWithBackslash },
295a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, s_LinkTargetWithBackslash, s_LinkTarget, FLAGS4, s_DirsWithBackslash },
296a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_FULLPATH, s_LinkTargetWithBackslash, s_LinkTarget, FLAGS5, s_DirsWithBackslash },
297a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, s_LinkTargetWithBackslash, s_LinkTarget, FLAGS6, s_DirsWithBackslash },
298a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, s_LinkTargetWithBackslash, s_LinkTarget, FLAGS7, s_DirsWithBackslash },
299a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_FULLPATH, s_LinkTargetWithBackslash, s_LinkTarget, FLAGS8, s_DirsWithBackslash },
300a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, s_LinkTargetWithBackslash, s_LinkTarget, FLAGS9, s_DirsWithBackslash },
301a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, s_LinkTargetWithBackslash, s_LinkTarget, FLAGS10, s_DirsWithBackslash },
302a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_FULLPATH, s_LinkTargetWithBackslash, s_LinkTarget, FLAGS11, s_DirsWithBackslash },
303a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, s_LinkTargetWithBackslash, s_LinkTarget, FLAGS12, s_DirsWithBackslash },
304a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, s_LinkTargetWithBackslash, s_LinkTarget, FLAGS13, s_DirsWithBackslash },
305346d12bcSKatayama Hirofumi MZ     /* 2PRONG.txt (double backslash) */
306a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_FULLPATH, s_LinkTargetDoubleBackslash, s_LinkTarget, FLAGS0 },
307a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, s_LinkTargetDoubleBackslash, s_LinkTarget, FLAGS1 },
308a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_FULLPATH, s_LinkTargetDoubleBackslash, s_LinkTarget, FLAGS2 },
309a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, s_LinkTargetDoubleBackslash, s_LinkTarget, FLAGS3 },
310a17664ceSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_FULLPATH, s_LinkTargetDoubleBackslash, NULL, FLAGS4 },
311a17664ceSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_FULLPATH, s_LinkTargetDoubleBackslash, NULL, FLAGS5 },
312a17664ceSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_FULLPATH, s_LinkTargetDoubleBackslash, NULL, FLAGS6 },
313a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, s_LinkTargetDoubleBackslash, s_LinkTarget, FLAGS7 },
314a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_FULLPATH, s_LinkTargetDoubleBackslash, s_LinkTarget, FLAGS8 },
315a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, s_LinkTargetDoubleBackslash, s_LinkTarget, FLAGS9 },
316a17664ceSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_FULLPATH, s_LinkTargetDoubleBackslash, NULL, FLAGS10 },
317a17664ceSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_FULLPATH, s_LinkTargetDoubleBackslash, NULL, FLAGS11 },
318a17664ceSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_FULLPATH, s_LinkTargetDoubleBackslash, NULL, FLAGS12 },
319a17664ceSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_FULLPATH, s_LinkTargetDoubleBackslash, NULL, FLAGS13 },
320346d12bcSKatayama Hirofumi MZ     /* 2PRONG.txt with dirs (double backslash) */
321a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_IGNORE, EF_FULLPATH, s_LinkTargetDoubleBackslash, s_LinkTarget, FLAGS0, s_Dirs },
322a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, s_LinkTargetDoubleBackslash, s_LinkTarget, FLAGS1, s_Dirs },
323a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_FULLPATH, s_LinkTargetDoubleBackslash, s_LinkTarget, FLAGS2, s_Dirs },
324a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, s_LinkTargetDoubleBackslash, s_LinkTarget, FLAGS3, s_Dirs },
325a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, s_LinkTargetDoubleBackslash, s_LinkTarget, FLAGS4, s_Dirs },
326a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_FULLPATH, s_LinkTargetDoubleBackslash, s_LinkTarget, FLAGS5, s_Dirs },
327a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, s_LinkTargetDoubleBackslash, s_LinkTarget, FLAGS6, s_Dirs },
328a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, s_LinkTargetDoubleBackslash, s_LinkTarget, FLAGS7, s_Dirs },
329a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_FULLPATH, s_LinkTargetDoubleBackslash, s_LinkTarget, FLAGS8, s_Dirs },
330a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, s_LinkTargetDoubleBackslash, s_LinkTarget, FLAGS9, s_Dirs },
331a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, s_LinkTargetDoubleBackslash, s_LinkTarget, FLAGS10, s_Dirs },
332a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_FULLPATH, s_LinkTargetDoubleBackslash, s_LinkTarget, FLAGS11, s_Dirs },
333a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, s_LinkTargetDoubleBackslash, s_LinkTarget, FLAGS12, s_Dirs },
334a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, s_LinkTargetDoubleBackslash, s_LinkTarget, FLAGS13, s_Dirs },
335c2c66affSColin Finck     /* 2PRONG.txt (name only) */
33683e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG.txt", NULL, FLAGS0 },
33783e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG.txt", NULL, FLAGS1 },
33883e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG.txt", NULL, FLAGS2 },
33983e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG.txt", NULL, FLAGS3 },
34083e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG.txt", NULL, FLAGS4 },
34183e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG.txt", NULL, FLAGS5 },
34283e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG.txt", NULL, FLAGS6 },
34383e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG.txt", NULL, FLAGS7 },
34483e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG.txt", NULL, FLAGS8 },
34583e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG.txt", NULL, FLAGS9 },
34683e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG.txt", NULL, FLAGS10 },
34783e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG.txt", NULL, FLAGS11 },
34883e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG.txt", NULL, FLAGS12 },
34983e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG.txt", NULL, FLAGS13 },
35002d92979SKatayama Hirofumi MZ     /* .\2PRONG.txt with dirs (path) */
35102d92979SKatayama Hirofumi MZ     { __LINE__, 1, ERR_IGNORE, EF_FULLPATH, L".\\2PRONG.txt", NULL, FLAGS0, s_Dirs },
35202d92979SKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L".\\2PRONG.txt", NULL, FLAGS1, s_Dirs },
35302d92979SKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_FULLPATH, L".\\2PRONG.txt", NULL, FLAGS2, s_Dirs },
35402d92979SKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L".\\2PRONG.txt", NULL, FLAGS3, s_Dirs },
35502d92979SKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L".\\2PRONG.txt", s_LinkTarget, FLAGS4, s_Dirs },
35602d92979SKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_FULLPATH, L".\\2PRONG.txt", NULL, FLAGS5, s_Dirs },
35702d92979SKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L".\\2PRONG.txt", NULL, FLAGS6, s_Dirs },
35802d92979SKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L".\\2PRONG.txt", NULL, FLAGS7, s_Dirs },
35902d92979SKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_FULLPATH, L".\\2PRONG.txt", NULL, FLAGS8, s_Dirs },
36002d92979SKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L".\\2PRONG.txt", NULL, FLAGS9, s_Dirs },
36102d92979SKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L".\\2PRONG.txt", s_LinkTarget, FLAGS10, s_Dirs },
36202d92979SKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_FULLPATH, L".\\2PRONG.txt", NULL, FLAGS11, s_Dirs },
36302d92979SKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L".\\2PRONG.txt", s_LinkTarget, FLAGS12, s_Dirs },
36402d92979SKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L".\\2PRONG.txt", s_LinkTarget, FLAGS13, s_Dirs },
36502d92979SKatayama Hirofumi MZ     /* .\\2PRONG.txt with dirs (path) */
36602d92979SKatayama Hirofumi MZ     { __LINE__, 1, ERR_IGNORE, EF_FULLPATH, L".\\\\2PRONG.txt", NULL, FLAGS0, s_Dirs },
36702d92979SKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L".\\\\2PRONG.txt", NULL, FLAGS1, s_Dirs },
36802d92979SKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_FULLPATH, L".\\\\2PRONG.txt", NULL, FLAGS2, s_Dirs },
36902d92979SKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L".\\\\2PRONG.txt", NULL, FLAGS3, s_Dirs },
37002d92979SKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L".\\\\2PRONG.txt", s_LinkTarget, FLAGS4, s_Dirs },
37102d92979SKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_FULLPATH, L".\\\\2PRONG.txt", NULL, FLAGS5, s_Dirs },
37202d92979SKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L".\\\\2PRONG.txt", NULL, FLAGS6, s_Dirs },
37302d92979SKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L".\\\\2PRONG.txt", NULL, FLAGS7, s_Dirs },
37402d92979SKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_FULLPATH, L".\\\\2PRONG.txt", NULL, FLAGS8, s_Dirs },
37502d92979SKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L".\\\\2PRONG.txt", NULL, FLAGS9, s_Dirs },
37602d92979SKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L".\\\\2PRONG.txt", s_LinkTarget, FLAGS10, s_Dirs },
37702d92979SKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_FULLPATH, L".\\\\2PRONG.txt", NULL, FLAGS11, s_Dirs },
37802d92979SKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L".\\\\2PRONG.txt", s_LinkTarget, FLAGS12, s_Dirs },
37902d92979SKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L".\\\\2PRONG.txt", s_LinkTarget, FLAGS13, s_Dirs },
38002d92979SKatayama Hirofumi MZ     /* .\..\.\testdir\..\testdir\2PRONG.txt with dirs */
38102d92979SKatayama Hirofumi MZ     { __LINE__, 1, ERR_IGNORE, EF_TESTDATA, L".\\..\\.\\testdir\\..\\testdir\\2PRONG.txt", L"2PRONG.txt", FLAGS0, s_Dirs },
38202d92979SKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_TESTDATA, L".\\..\\.\\testdir\\..\\testdir\\2PRONG.txt", L"2PRONG.txt", FLAGS1, s_Dirs },
38302d92979SKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_TESTDATA, L".\\..\\.\\testdir\\..\\testdir\\2PRONG.txt", L"2PRONG.txt", FLAGS2, s_Dirs },
38402d92979SKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_TESTDATA, L".\\..\\.\\testdir\\..\\testdir\\2PRONG.txt", L"2PRONG.txt", FLAGS3, s_Dirs },
38502d92979SKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_TESTDATA, L".\\..\\.\\testdir\\..\\testdir\\2PRONG.txt", L"2PRONG.txt", FLAGS4, s_Dirs },
38602d92979SKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_TESTDATA, L".\\..\\.\\testdir\\..\\testdir\\2PRONG.txt", L"2PRONG.txt", FLAGS5, s_Dirs },
38702d92979SKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_TESTDATA, L".\\..\\.\\testdir\\..\\testdir\\2PRONG.txt", L"2PRONG.txt", FLAGS6, s_Dirs },
38802d92979SKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_TESTDATA, L".\\..\\.\\testdir\\..\\testdir\\2PRONG.txt", L"2PRONG.txt", FLAGS7, s_Dirs },
38902d92979SKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_TESTDATA, L".\\..\\.\\testdir\\..\\testdir\\2PRONG.txt", L"2PRONG.txt", FLAGS8, s_Dirs },
39002d92979SKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_TESTDATA, L".\\..\\.\\testdir\\..\\testdir\\2PRONG.txt", L"2PRONG.txt", FLAGS9, s_Dirs },
39102d92979SKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_TESTDATA, L".\\..\\.\\testdir\\..\\testdir\\2PRONG.txt", L"2PRONG.txt", FLAGS10, s_Dirs },
39202d92979SKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_TESTDATA, L".\\..\\.\\testdir\\..\\testdir\\2PRONG.txt", L"2PRONG.txt", FLAGS11, s_Dirs },
39302d92979SKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_TESTDATA, L".\\..\\.\\testdir\\..\\testdir\\2PRONG.txt", L"2PRONG.txt", FLAGS12, s_Dirs },
39402d92979SKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_TESTDATA, L".\\..\\.\\testdir\\..\\testdir\\2PRONG.txt", L"2PRONG.txt", FLAGS13, s_Dirs },
39502d92979SKatayama Hirofumi MZ     /* ..\testdir\.\..\testdir\.\.\2PRONG.txt with dirs (path) */
39602d92979SKatayama Hirofumi MZ     { __LINE__, 1, ERR_IGNORE, EF_FULLPATH, L"..\\testdir\\.\\..\\testdir\\.\\.\\2PRONG.txt", NULL, FLAGS0, s_Dirs },
39702d92979SKatayama Hirofumi MZ     { __LINE__, RET_IGNORE, ERR_IGNORE, EF_FULLPATH, L"..\\testdir\\.\\..\\testdir\\.\\.\\2PRONG.txt", NULL, FLAGS1, s_Dirs },
39802d92979SKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_FULLPATH, L"..\\testdir\\.\\..\\testdir\\.\\.\\2PRONG.txt", NULL, FLAGS2, s_Dirs },
39902d92979SKatayama Hirofumi MZ     { __LINE__, RET_IGNORE, ERR_IGNORE, EF_FULLPATH, L"..\\testdir\\.\\..\\testdir\\.\\.\\2PRONG.txt", NULL, FLAGS3, s_Dirs },
40002d92979SKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L"..\\testdir\\.\\..\\testdir\\.\\.\\2PRONG.txt", s_LinkTarget, FLAGS4, s_Dirs },
40102d92979SKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_FULLPATH, L"..\\testdir\\.\\..\\testdir\\.\\.\\2PRONG.txt", s_LinkTarget, FLAGS5, s_Dirs },
40202d92979SKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L"..\\testdir\\.\\..\\testdir\\.\\.\\2PRONG.txt", s_LinkTarget, FLAGS6, s_Dirs },
40302d92979SKatayama Hirofumi MZ     { __LINE__, RET_IGNORE, ERR_IGNORE, EF_FULLPATH, L"..\\testdir\\.\\..\\testdir\\.\\.\\2PRONG.txt", NULL, FLAGS7, s_Dirs },
40402d92979SKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_FULLPATH, L"..\\testdir\\.\\..\\testdir\\.\\.\\2PRONG.txt", NULL, FLAGS8, s_Dirs },
40502d92979SKatayama Hirofumi MZ     { __LINE__, RET_IGNORE, ERR_IGNORE, EF_FULLPATH, L"..\\testdir\\.\\..\\testdir\\.\\.\\2PRONG.txt", NULL, FLAGS9, s_Dirs },
40602d92979SKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L"..\\testdir\\.\\..\\testdir\\.\\.\\2PRONG.txt", s_LinkTarget, FLAGS10, s_Dirs },
40702d92979SKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_FULLPATH, L"..\\testdir\\.\\..\\testdir\\.\\.\\2PRONG.txt", s_LinkTarget, FLAGS11, s_Dirs },
40802d92979SKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L"..\\testdir\\.\\..\\testdir\\.\\.\\2PRONG.txt", s_LinkTarget, FLAGS12, s_Dirs },
40902d92979SKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, L"..\\testdir\\.\\..\\testdir\\.\\.\\2PRONG.txt", s_LinkTarget, FLAGS13, s_Dirs },
410c2c66affSColin Finck     /* 2PRONG.txt with dirs (name only) */
41183e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERR_IGNORE, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG.txt", L"2PRONG.txt", FLAGS0, s_Dirs },
41283e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG.txt", L"2PRONG.txt", FLAGS1, s_Dirs },
41383e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG.txt", L"2PRONG.txt", FLAGS2, s_Dirs },
41483e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG.txt", L"2PRONG.txt", FLAGS3, s_Dirs },
41583e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG.txt", L"2PRONG.txt", FLAGS4, s_Dirs },
41683e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG.txt", L"2PRONG.txt", FLAGS5, s_Dirs },
41783e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG.txt", L"2PRONG.txt", FLAGS6, s_Dirs },
41883e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG.txt", L"2PRONG.txt", FLAGS7, s_Dirs },
41983e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG.txt", L"2PRONG.txt", FLAGS8, s_Dirs },
42083e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG.txt", L"2PRONG.txt", FLAGS9, s_Dirs },
42183e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG.txt", L"2PRONG.txt", FLAGS10, s_Dirs },
42283e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG.txt", L"2PRONG.txt", FLAGS11, s_Dirs },
42383e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG.txt", L"2PRONG.txt", FLAGS12, s_Dirs },
42483e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"2PRONG.txt", L"2PRONG.txt", FLAGS13, s_Dirs },
425a17664ceSKatayama Hirofumi MZ     /* testdir/CmdLineUtils (path) */
42683e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_TESTDATA, L"CmdLineUtils", L"CmdLineUtils", FLAGS0 },
427a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_IGNORE, EF_TESTDATA, L"CmdLineUtils", L"CmdLineUtils.lnk", FLAGS1 },
42883e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_TESTDATA, L"CmdLineUtils", L"CmdLineUtils", FLAGS2 },
429a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_IGNORE, EF_TESTDATA, L"CmdLineUtils", L"CmdLineUtils.lnk", FLAGS3 },
43083e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_TESTDATA, L"CmdLineUtils", L"CmdLineUtils", FLAGS4 },
43183e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_TESTDATA, L"CmdLineUtils", L"CmdLineUtils", FLAGS5 },
43283e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_TESTDATA, L"CmdLineUtils", L"CmdLineUtils", FLAGS6 },
433a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_IGNORE, EF_TESTDATA, L"CmdLineUtils", L"CmdLineUtils.lnk", FLAGS7 },
43483e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_TESTDATA, L"CmdLineUtils", L"CmdLineUtils", FLAGS8 },
435a17664ceSKatayama Hirofumi MZ     { __LINE__, 1, ERR_IGNORE, EF_TESTDATA, L"CmdLineUtils", L"CmdLineUtils.lnk", FLAGS9 },
43683e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_TESTDATA, L"CmdLineUtils", L"CmdLineUtils", FLAGS10 },
43783e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_TESTDATA, L"CmdLineUtils", L"CmdLineUtils", FLAGS11 },
43883e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_TESTDATA, L"CmdLineUtils", L"CmdLineUtils", FLAGS12 },
43983e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_TESTDATA, L"CmdLineUtils", L"CmdLineUtils", FLAGS13 },
440a17664ceSKatayama Hirofumi MZ     /* testdir/CmdLineUtils with PRF_DONTFINDLNK (path) */
44183e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_TESTDATA, L"CmdLineUtils", L"CmdLineUtils", FLAGS0 | PRF_DONTFINDLNK },
44283e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA, L"CmdLineUtils", L"CmdLineUtils", FLAGS1 | PRF_DONTFINDLNK },
44383e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_TESTDATA, L"CmdLineUtils", L"CmdLineUtils", FLAGS2 | PRF_DONTFINDLNK },
44483e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA, L"CmdLineUtils", L"CmdLineUtils", FLAGS3 | PRF_DONTFINDLNK },
44583e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_TESTDATA, L"CmdLineUtils", L"CmdLineUtils", FLAGS4 | PRF_DONTFINDLNK },
44683e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_TESTDATA, L"CmdLineUtils", L"CmdLineUtils", FLAGS5 | PRF_DONTFINDLNK },
44783e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_TESTDATA, L"CmdLineUtils", L"CmdLineUtils", FLAGS6 | PRF_DONTFINDLNK },
44883e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA, L"CmdLineUtils", L"CmdLineUtils", FLAGS7 | PRF_DONTFINDLNK },
44983e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_TESTDATA, L"CmdLineUtils", L"CmdLineUtils", FLAGS8 | PRF_DONTFINDLNK },
45083e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA, L"CmdLineUtils", L"CmdLineUtils", FLAGS9 | PRF_DONTFINDLNK },
45183e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_TESTDATA, L"CmdLineUtils", L"CmdLineUtils", FLAGS10 | PRF_DONTFINDLNK },
45283e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_TESTDATA, L"CmdLineUtils", L"CmdLineUtils", FLAGS11 | PRF_DONTFINDLNK },
45383e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_TESTDATA, L"CmdLineUtils", L"CmdLineUtils", FLAGS12 | PRF_DONTFINDLNK },
45483e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_TESTDATA, L"CmdLineUtils", L"CmdLineUtils", FLAGS13 | PRF_DONTFINDLNK },
455a17664ceSKatayama Hirofumi MZ     /* testdir/CmdLineUtils (name only) */
45683e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils", NULL, FLAGS0 },
45783e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils", NULL, FLAGS1 },
45883e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils", NULL, FLAGS2 },
45983e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils", NULL, FLAGS3 },
46083e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils", NULL, FLAGS4 },
46183e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils", NULL, FLAGS5 },
46283e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils", NULL, FLAGS6 },
46383e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils", NULL, FLAGS7 },
46483e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils", NULL, FLAGS8 },
46583e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils", NULL, FLAGS9 },
46683e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils", NULL, FLAGS10 },
46783e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils", NULL, FLAGS11 },
46883e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils", NULL, FLAGS12 },
46983e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils", NULL, FLAGS13 },
470a17664ceSKatayama Hirofumi MZ     /* testdir/CmdLineUtils.exe (path) */
47183e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_TESTDATA, L"CmdLineUtils.exe", L"CmdLineUtils.exe", FLAGS0 },
47283e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA, L"CmdLineUtils.exe", L"CmdLineUtils.exe", FLAGS1 },
47383e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_TESTDATA, L"CmdLineUtils.exe", L"CmdLineUtils.exe", FLAGS2 },
47483e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA, L"CmdLineUtils.exe", L"CmdLineUtils.exe", FLAGS3 },
47583e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_TESTDATA, L"CmdLineUtils.exe", L"CmdLineUtils.exe", FLAGS4 },
47683e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_TESTDATA, L"CmdLineUtils.exe", L"CmdLineUtils.exe", FLAGS5 },
47783e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_TESTDATA, L"CmdLineUtils.exe", L"CmdLineUtils.exe", FLAGS6 },
47883e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA, L"CmdLineUtils.exe", L"CmdLineUtils.exe", FLAGS7 },
47983e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_TESTDATA, L"CmdLineUtils.exe", L"CmdLineUtils.exe", FLAGS8 },
48083e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA, L"CmdLineUtils.exe", L"CmdLineUtils.exe", FLAGS9 },
48183e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_TESTDATA, L"CmdLineUtils.exe", L"CmdLineUtils.exe", FLAGS10 },
48283e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_TESTDATA, L"CmdLineUtils.exe", L"CmdLineUtils.exe", FLAGS11 },
48383e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_TESTDATA, L"CmdLineUtils.exe", L"CmdLineUtils.exe", FLAGS12 },
48483e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_TESTDATA, L"CmdLineUtils.exe", L"CmdLineUtils.exe", FLAGS13 },
485a17664ceSKatayama Hirofumi MZ     /* testdir/CmdLineUtils.exe (name only) */
48683e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils.exe", NULL, FLAGS0 },
48783e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils.exe", NULL, FLAGS1 },
48883e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils.exe", NULL, FLAGS2 },
48983e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils.exe", NULL, FLAGS3 },
49083e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils.exe", NULL, FLAGS4 },
49183e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils.exe", NULL, FLAGS5 },
49283e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils.exe", NULL, FLAGS6 },
49383e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils.exe", NULL, FLAGS7 },
49483e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils.exe", NULL, FLAGS8 },
49583e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils.exe", NULL, FLAGS9 },
49683e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils.exe", NULL, FLAGS10 },
49783e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils.exe", NULL, FLAGS11 },
49883e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils.exe", NULL, FLAGS12 },
49983e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils.exe", NULL, FLAGS13 },
500a17664ceSKatayama Hirofumi MZ     /* testdir/CmdLineUtils.exe with dirs (name only) */
50183e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils.exe", NULL, FLAGS0, s_Dirs },
50283e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils.exe", NULL, FLAGS1, s_Dirs },
50383e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils.exe", NULL, FLAGS2, s_Dirs },
50483e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils.exe", NULL, FLAGS3, s_Dirs },
50583e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils.exe", NULL, FLAGS4, s_Dirs },
50683e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils.exe", NULL, FLAGS5, s_Dirs },
50783e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils.exe", NULL, FLAGS6, s_Dirs },
50883e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils.exe", NULL, FLAGS7, s_Dirs },
50983e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils.exe", NULL, FLAGS8, s_Dirs },
51083e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils.exe", NULL, FLAGS9, s_Dirs },
51183e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils.exe", NULL, FLAGS10, s_Dirs },
51283e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils.exe", NULL, FLAGS11, s_Dirs },
51383e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils.exe", NULL, FLAGS12, s_Dirs },
51483e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils.exe", NULL, FLAGS13, s_Dirs },
515a17664ceSKatayama Hirofumi MZ     /* testdir/CmdLineUtils.exe with dirs (name only) */
51683e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils.exe", NULL, FLAGS0, s_Dirs },
51783e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils.exe", NULL, FLAGS1, s_Dirs },
51883e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils.exe", NULL, FLAGS2, s_Dirs },
51983e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils.exe", NULL, FLAGS3, s_Dirs },
52083e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils.exe", NULL, FLAGS4, s_Dirs },
52183e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils.exe", NULL, FLAGS5, s_Dirs },
52283e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils.exe", NULL, FLAGS6, s_Dirs },
52383e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils.exe", NULL, FLAGS7, s_Dirs },
52483e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils.exe", NULL, FLAGS8, s_Dirs },
52583e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils.exe", NULL, FLAGS9, s_Dirs },
52683e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils.exe", NULL, FLAGS10, s_Dirs },
52783e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils.exe", NULL, FLAGS11, s_Dirs },
52883e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils.exe", NULL, FLAGS12, s_Dirs },
52983e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY, L"CmdLineUtils.exe", NULL, FLAGS13, s_Dirs },
530a17664ceSKatayama Hirofumi MZ     /* GhostProgram.exe -> testdir/CmdLineUtils.exe (name only, app path) */
53183e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY | EF_APP_PATH, L"GhostProgram.exe", L"CmdLineUtils.exe", FLAGS0 },
53283e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY | EF_APP_PATH, L"GhostProgram.exe", L"CmdLineUtils.exe", FLAGS1 },
53383e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY | EF_APP_PATH, L"GhostProgram.exe", L"CmdLineUtils.exe", FLAGS2 },
53483e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY | EF_APP_PATH, L"GhostProgram.exe", L"CmdLineUtils.exe", FLAGS3 },
53583e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY | EF_APP_PATH, L"GhostProgram.exe", L"CmdLineUtils.exe", FLAGS4 },
53683e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY | EF_APP_PATH, L"GhostProgram.exe", L"CmdLineUtils.exe", FLAGS5 },
53783e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY | EF_APP_PATH, L"GhostProgram.exe", L"CmdLineUtils.exe", FLAGS6 },
53883e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY | EF_APP_PATH, L"GhostProgram.exe", L"CmdLineUtils.exe", FLAGS7 },
53983e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY | EF_APP_PATH, L"GhostProgram.exe", L"CmdLineUtils.exe", FLAGS8 },
54083e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY | EF_APP_PATH, L"GhostProgram.exe", L"CmdLineUtils.exe", FLAGS9 },
54183e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY | EF_APP_PATH, L"GhostProgram.exe", L"CmdLineUtils.exe", FLAGS10 },
54283e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY | EF_APP_PATH, L"GhostProgram.exe", L"CmdLineUtils.exe", FLAGS11 },
54383e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY | EF_APP_PATH, L"GhostProgram.exe", L"CmdLineUtils.exe", FLAGS12 },
54483e690cdSKatayama Hirofumi MZ     { __LINE__, 0, ERROR_FILE_NOT_FOUND, EF_TESTDATA | EF_NAME_ONLY | EF_APP_PATH, L"GhostProgram.exe", L"CmdLineUtils.exe", FLAGS13 },
545c2c66affSColin Finck     /* CmdLineUtils.lnk */
54683e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_FULLPATH, s_ShortcutLongName, s_ShortcutLongName, FLAGS0 },
54783e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, s_ShortcutLongName, s_ShortcutLongName, FLAGS1 },
54883e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_FULLPATH, s_ShortcutLongName, NULL, FLAGS2 },
54983e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, s_ShortcutLongName, s_ShortcutLongName, FLAGS3 },
55083e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_FULLPATH, s_ShortcutLongName, s_ShortcutLongName, FLAGS4 },
55183e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_FULLPATH, s_ShortcutLongName, s_ShortcutLongName, FLAGS5 },
55283e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_FULLPATH, s_ShortcutLongName, s_ShortcutLongName, FLAGS6 },
55383e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, s_ShortcutLongName, s_ShortcutLongName, FLAGS7 },
55483e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_FULLPATH, s_ShortcutLongName, s_ShortcutLongName, FLAGS8 },
55583e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, s_ShortcutLongName, s_ShortcutLongName, FLAGS9 },
55683e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_FULLPATH, s_ShortcutLongName, s_ShortcutLongName, FLAGS10 },
55783e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_FULLPATH, s_ShortcutLongName, s_ShortcutLongName, FLAGS11 },
55883e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_FULLPATH, s_ShortcutLongName, s_ShortcutLongName, FLAGS12 },
55983e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_FULLPATH, s_ShortcutLongName, s_ShortcutLongName, FLAGS13 },
560c2c66affSColin Finck     /* CmdLineUtils.lnk (with PRF_DONTFINDLNK) */
56183e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_FULLPATH, s_ShortcutLongName, s_ShortcutLongName, FLAGS0 | PRF_DONTFINDLNK },
56283e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, s_ShortcutLongName, s_ShortcutLongName, FLAGS1 | PRF_DONTFINDLNK },
56383e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_FULLPATH, s_ShortcutLongName, NULL, FLAGS2 | PRF_DONTFINDLNK },
56483e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, s_ShortcutLongName, s_ShortcutLongName, FLAGS3 | PRF_DONTFINDLNK },
56583e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_FULLPATH, s_ShortcutLongName, s_ShortcutLongName, FLAGS4 | PRF_DONTFINDLNK },
56683e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_FULLPATH, s_ShortcutLongName, s_ShortcutLongName, FLAGS5 | PRF_DONTFINDLNK },
56783e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_FULLPATH, s_ShortcutLongName, s_ShortcutLongName, FLAGS6 | PRF_DONTFINDLNK },
56883e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, s_ShortcutLongName, s_ShortcutLongName, FLAGS7 | PRF_DONTFINDLNK },
56983e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERR_NO_CHANGE, EF_FULLPATH, s_ShortcutLongName, s_ShortcutLongName, FLAGS8 | PRF_DONTFINDLNK },
57083e690cdSKatayama Hirofumi MZ     { __LINE__, 1, ERROR_FILE_NOT_FOUND, EF_FULLPATH, s_ShortcutLongName, s_ShortcutLongName, FLAGS9 | PRF_DONTFINDLNK },
57183e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_FULLPATH, s_ShortcutLongName, s_ShortcutLongName, FLAGS10 | PRF_DONTFINDLNK },
57283e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_FULLPATH, s_ShortcutLongName, s_ShortcutLongName, FLAGS11 | PRF_DONTFINDLNK },
57383e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_FULLPATH, s_ShortcutLongName, s_ShortcutLongName, FLAGS12 | PRF_DONTFINDLNK },
57483e690cdSKatayama Hirofumi MZ     { __LINE__, RAISED, ERR_DEAD, EF_FULLPATH, s_ShortcutLongName, s_ShortcutLongName, FLAGS13 | PRF_DONTFINDLNK },
575c2c66affSColin Finck };
576c2c66affSColin Finck 
577c2c66affSColin Finck static BOOL
CreateShortcut(LPCWSTR pszLnkFileName,LPCWSTR pszTargetPathName)578c2c66affSColin Finck CreateShortcut(LPCWSTR pszLnkFileName,
579c2c66affSColin Finck                LPCWSTR pszTargetPathName)
580c2c66affSColin Finck {
581c2c66affSColin Finck     IPersistFile *ppf;
582c2c66affSColin Finck     IShellLinkW* psl;
583c2c66affSColin Finck     HRESULT hres;
584c2c66affSColin Finck 
585c2c66affSColin Finck     hres = CoInitialize(NULL);
586c2c66affSColin Finck     if (SUCCEEDED(hres))
587c2c66affSColin Finck     {
588c2c66affSColin Finck         hres = CoCreateInstance(CLSID_ShellLink, NULL,
589c2c66affSColin Finck             CLSCTX_INPROC_SERVER, IID_IShellLinkW, (LPVOID*)&psl);
590c2c66affSColin Finck         if (SUCCEEDED(hres))
591c2c66affSColin Finck         {
592c2c66affSColin Finck             psl->SetPath(pszTargetPathName);
593c2c66affSColin Finck             hres = psl->QueryInterface(IID_IPersistFile, (LPVOID*)&ppf);
594c2c66affSColin Finck             if (SUCCEEDED(hres))
595c2c66affSColin Finck             {
596c2c66affSColin Finck                 hres = ppf->Save(pszLnkFileName, TRUE);
597c2c66affSColin Finck                 ppf->Release();
598c2c66affSColin Finck             }
599c2c66affSColin Finck             psl->Release();
600c2c66affSColin Finck         }
601c2c66affSColin Finck         CoUninitialize();
602c2c66affSColin Finck     }
603c2c66affSColin Finck     SetLastError(hres);
604c2c66affSColin Finck 
605c2c66affSColin Finck     return SUCCEEDED(hres);
606c2c66affSColin Finck }
607c2c66affSColin Finck 
608c2c66affSColin Finck static BOOL
CreateRegAppPath(INT SectionNumber,INT LineNumber,const WCHAR * Name,const WCHAR * Value)6096fe0a082SKatayama Hirofumi MZ CreateRegAppPath(INT SectionNumber, INT LineNumber, const WCHAR* Name, const WCHAR* Value)
610c2c66affSColin Finck {
611c2c66affSColin Finck     HKEY RegistryKey;
612c2c66affSColin Finck     LONG Result;
613c2c66affSColin Finck     WCHAR Buffer[1024];
614c2c66affSColin Finck     DWORD Disposition;
615c2c66affSColin Finck 
616c2c66affSColin Finck     wcscpy(Buffer, L"Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\");
617c2c66affSColin Finck     wcscat(Buffer, Name);
618c2c66affSColin Finck     Result = RegCreateKeyExW(HKEY_LOCAL_MACHINE, Buffer, 0, NULL,
619c2c66affSColin Finck         0, KEY_WRITE, NULL, &RegistryKey, &Disposition);
620c2c66affSColin Finck     if (Result != ERROR_SUCCESS)
621c2c66affSColin Finck     {
6226fe0a082SKatayama Hirofumi MZ         trace("Section %d, Line %d: Could not create test key. Status: %lu\n",
6236fe0a082SKatayama Hirofumi MZ               SectionNumber, LineNumber, Result);
624c2c66affSColin Finck         return FALSE;
625c2c66affSColin Finck     }
626c2c66affSColin Finck     Result = RegSetValueW(RegistryKey, NULL, REG_SZ, Value, 0);
627c2c66affSColin Finck     if (Result != ERROR_SUCCESS)
628c2c66affSColin Finck     {
6296fe0a082SKatayama Hirofumi MZ         trace("Section %d, Line %d: Could not set value of the test key. Status: %lu\n",
6306fe0a082SKatayama Hirofumi MZ               SectionNumber, LineNumber, Result);
631c2c66affSColin Finck         RegCloseKey(RegistryKey);
632c2c66affSColin Finck         return FALSE;
633c2c66affSColin Finck     }
634c2c66affSColin Finck     RegCloseKey(RegistryKey);
635c2c66affSColin Finck     return TRUE;
636c2c66affSColin Finck }
637c2c66affSColin Finck 
638c2c66affSColin Finck static BOOL
DeleteRegAppPath(INT SectionNumber,INT LineNumber,const WCHAR * Name)6396fe0a082SKatayama Hirofumi MZ DeleteRegAppPath(INT SectionNumber, INT LineNumber, const WCHAR* Name)
640c2c66affSColin Finck {
641c2c66affSColin Finck     LONG Result;
642c2c66affSColin Finck     WCHAR Buffer[1024];
643c2c66affSColin Finck     wcscpy(Buffer, L"Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\");
644c2c66affSColin Finck     wcscat(Buffer, Name);
645c2c66affSColin Finck     Result = RegDeleteKeyW(HKEY_LOCAL_MACHINE, Buffer);
646c2c66affSColin Finck     if (Result != ERROR_SUCCESS)
647c2c66affSColin Finck     {
6486fe0a082SKatayama Hirofumi MZ         trace("Section %d, Line %d: Could not remove the test key. Status: %lu\n",
6496fe0a082SKatayama Hirofumi MZ               SectionNumber, LineNumber, Result);
650c2c66affSColin Finck         return FALSE;
651c2c66affSColin Finck     }
652c2c66affSColin Finck     return TRUE;
653c2c66affSColin Finck }
654c2c66affSColin Finck 
DoEntry(INT SectionNumber,INT LineNumber,const TEST_ENTRY * pEntry)65583e690cdSKatayama Hirofumi MZ static void DoEntry(INT SectionNumber, INT LineNumber, const TEST_ENTRY *pEntry)
656c2c66affSColin Finck {
657c2c66affSColin Finck     WCHAR Path[MAX_PATH], PathExpected[MAX_PATH];
658c2c66affSColin Finck     INT Ret;
659c2c66affSColin Finck     DWORD Error;
660c2c66affSColin Finck 
661*2c4cb40dSKatayama Hirofumi MZ     ZeroMemory(Path, sizeof(Path));
662*2c4cb40dSKatayama Hirofumi MZ     ZeroMemory(PathExpected, sizeof(PathExpected));
663*2c4cb40dSKatayama Hirofumi MZ 
664c2c66affSColin Finck     if (pEntry->NameBefore == NULL)
665c2c66affSColin Finck     {
666c2c66affSColin Finck         assert(pEntry->NameExpected == NULL);
667c2c66affSColin Finck     }
668c2c66affSColin Finck 
669c2c66affSColin Finck     switch (pEntry->EF_ & EF_TYPE_MASK)
670c2c66affSColin Finck     {
671c2c66affSColin Finck         case EF_FULLPATH:
672c2c66affSColin Finck             if (pEntry->NameBefore)
673c2c66affSColin Finck             {
674c2c66affSColin Finck                 lstrcpyW(Path, pEntry->NameBefore);
675c2c66affSColin Finck             }
676c2c66affSColin Finck             if (pEntry->NameExpected)
677c2c66affSColin Finck             {
678c2c66affSColin Finck                 lstrcpyW(PathExpected, pEntry->NameExpected);
679c2c66affSColin Finck             }
680c2c66affSColin Finck             break;
681c2c66affSColin Finck 
682c2c66affSColin Finck         case EF_TESTDATA:
683c2c66affSColin Finck             if (pEntry->EF_ & EF_NAME_ONLY)
684c2c66affSColin Finck             {
685c2c66affSColin Finck                 lstrcpyW(Path, pEntry->NameBefore);
686c2c66affSColin Finck             }
687c2c66affSColin Finck             else
688c2c66affSColin Finck             {
68983e690cdSKatayama Hirofumi MZ                 lstrcpyW(Path, s_TestDir);
690c2c66affSColin Finck                 lstrcatW(Path, L"\\");
691c2c66affSColin Finck                 lstrcatW(Path, pEntry->NameBefore);
692c2c66affSColin Finck             }
693c2c66affSColin Finck 
694c2c66affSColin Finck             if (pEntry->NameExpected)
695c2c66affSColin Finck             {
69683e690cdSKatayama Hirofumi MZ                 lstrcpyW(PathExpected, s_TestDir);
697c2c66affSColin Finck                 lstrcatW(PathExpected, L"\\");
698c2c66affSColin Finck                 lstrcatW(PathExpected, pEntry->NameExpected);
699c2c66affSColin Finck             }
700c2c66affSColin Finck             break;
701a17664ceSKatayama Hirofumi MZ 
702a17664ceSKatayama Hirofumi MZ         default:
703a17664ceSKatayama Hirofumi MZ             assert(0);
704a17664ceSKatayama Hirofumi MZ             break;
705c2c66affSColin Finck     }
706c2c66affSColin Finck 
707c2c66affSColin Finck     if (pEntry->EF_ & EF_APP_PATH)
708c2c66affSColin Finck     {
7096fe0a082SKatayama Hirofumi MZ         if (!CreateRegAppPath(SectionNumber, LineNumber, pEntry->NameBefore, PathExpected))
710c2c66affSColin Finck         {
71183e690cdSKatayama Hirofumi MZ             skip("Section %d, Line %d: CreateRegAppPath failure\n", SectionNumber, LineNumber);
712c2c66affSColin Finck             return;
713c2c66affSColin Finck         }
714c2c66affSColin Finck     }
715c2c66affSColin Finck 
716c2c66affSColin Finck     _SEH2_TRY
717c2c66affSColin Finck     {
71883e690cdSKatayama Hirofumi MZ         SetLastError(ERR_NO_CHANGE);
719c2c66affSColin Finck         if (pEntry->NameBefore)
720c2c66affSColin Finck         {
721c2c66affSColin Finck             Ret = (*s_pPathResolve)(Path, pEntry->Dirs, pEntry->Flags);
722c2c66affSColin Finck         }
723c2c66affSColin Finck         else
724c2c66affSColin Finck         {
725c2c66affSColin Finck             Ret = (*s_pPathResolve)(NULL, pEntry->Dirs, pEntry->Flags);
726c2c66affSColin Finck         }
727c2c66affSColin Finck         Error = GetLastError();
728c2c66affSColin Finck     }
729c2c66affSColin Finck     _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
730c2c66affSColin Finck     {
731c2c66affSColin Finck         Ret = RAISED;
73283e690cdSKatayama Hirofumi MZ         Error = ERR_DEAD;
733c2c66affSColin Finck     }
734c2c66affSColin Finck     _SEH2_END;
735c2c66affSColin Finck 
736c2c66affSColin Finck     if (pEntry->EF_ & EF_APP_PATH)
737c2c66affSColin Finck     {
7386fe0a082SKatayama Hirofumi MZ         ok(DeleteRegAppPath(SectionNumber, LineNumber, pEntry->NameBefore),
73983e690cdSKatayama Hirofumi MZ            "Section %d, Line %d: DeleteRegAppPath failed\n", SectionNumber, LineNumber);
740c2c66affSColin Finck     }
741c2c66affSColin Finck 
74202d92979SKatayama Hirofumi MZ     if (pEntry->Ret != RET_IGNORE)
74302d92979SKatayama Hirofumi MZ     {
74483e690cdSKatayama Hirofumi MZ         ok(Ret == pEntry->Ret, "Section %d, Line %d: Ret expected %d, was %d.\n",
74583e690cdSKatayama Hirofumi MZ            SectionNumber, LineNumber, pEntry->Ret, Ret);
74602d92979SKatayama Hirofumi MZ     }
74702d92979SKatayama Hirofumi MZ 
74883e690cdSKatayama Hirofumi MZ     if (pEntry->Error != ERR_IGNORE)
749c2c66affSColin Finck     {
75083e690cdSKatayama Hirofumi MZ         ok(Error == pEntry->Error, "Section %d, Line %d: last error expected %ld, was %ld.\n",
75183e690cdSKatayama Hirofumi MZ            SectionNumber, LineNumber, pEntry->Error, Error);
752c2c66affSColin Finck     }
753c2c66affSColin Finck 
754c2c66affSColin Finck     if (pEntry->NameExpected && !(pEntry->EF_ & EF_APP_PATH))
755c2c66affSColin Finck     {
756*2c4cb40dSKatayama Hirofumi MZ         char expected[MAX_PATH];
757*2c4cb40dSKatayama Hirofumi MZ         char path[MAX_PATH];
758*2c4cb40dSKatayama Hirofumi MZ 
759*2c4cb40dSKatayama Hirofumi MZ         lstrcpynA(expected, wine_dbgstr_w(PathExpected), _countof(expected));
760*2c4cb40dSKatayama Hirofumi MZ         lstrcpynA(path, wine_dbgstr_w(Path), _countof(path));
761*2c4cb40dSKatayama Hirofumi MZ 
76283e690cdSKatayama Hirofumi MZ         ok(lstrcmpW(Path, PathExpected) == 0, "Section %d, Line %d: Path expected %s, was %s.\n",
763*2c4cb40dSKatayama Hirofumi MZ            SectionNumber, LineNumber, expected, path);
764c2c66affSColin Finck     }
765c2c66affSColin Finck }
766c2c66affSColin Finck 
TestMain_PathResolve(void)767c2c66affSColin Finck static void TestMain_PathResolve(void)
768c2c66affSColin Finck {
76983e690cdSKatayama Hirofumi MZ     UINT i, cEntries;
77083e690cdSKatayama Hirofumi MZ     const TEST_ENTRY *pEntries;
771c2c66affSColin Finck     WCHAR Saved[128], *pPathExtSaved;
772c2c66affSColin Finck 
77383e690cdSKatayama Hirofumi MZ     pEntries = s_LFNEntries;
77483e690cdSKatayama Hirofumi MZ     cEntries = _countof(s_LFNEntries);
77583e690cdSKatayama Hirofumi MZ 
776c2c66affSColin Finck     /* save PATHEXT */
777c2c66affSColin Finck     if (GetEnvironmentVariableW(L"PATHEXT", Saved, _countof(Saved)))
778c2c66affSColin Finck         pPathExtSaved = Saved;
779c2c66affSColin Finck     else
780c2c66affSColin Finck         pPathExtSaved = NULL;
781c2c66affSColin Finck 
78283e690cdSKatayama Hirofumi MZ     /* Section 1 */
78383e690cdSKatayama Hirofumi MZ     for (i = 0; i < cEntries; ++i)
784c2c66affSColin Finck     {
78583e690cdSKatayama Hirofumi MZ         DoEntry(1, pEntries[i].LineNumber, &pEntries[i]);
786c2c66affSColin Finck     }
787c2c66affSColin Finck 
78883e690cdSKatayama Hirofumi MZ     /* Section 2: reset PATHEXT */
789c2c66affSColin Finck     if (SetEnvironmentVariableW(L"PATHEXT", NULL))
790c2c66affSColin Finck     {
79183e690cdSKatayama Hirofumi MZ         for (i = 0; i < cEntries; ++i)
792346d12bcSKatayama Hirofumi MZ         {
79383e690cdSKatayama Hirofumi MZ             DoEntry(2, pEntries[i].LineNumber, &pEntries[i]);
794c2c66affSColin Finck         }
795346d12bcSKatayama Hirofumi MZ     }
796c2c66affSColin Finck     else
797c2c66affSColin Finck     {
798c2c66affSColin Finck         skip("SetEnvironmentVariableW failed\n");
799c2c66affSColin Finck     }
800c2c66affSColin Finck 
80183e690cdSKatayama Hirofumi MZ     /* Section 3: set PATHEXT to ".COM;.EXE;.BAT" */
802c2c66affSColin Finck     if (SetEnvironmentVariableW(L"PATHEXT", L".COM;.EXE;.BAT"))
803c2c66affSColin Finck     {
80483e690cdSKatayama Hirofumi MZ         for (i = 0; i < cEntries; ++i)
805346d12bcSKatayama Hirofumi MZ         {
80683e690cdSKatayama Hirofumi MZ             DoEntry(3, pEntries[i].LineNumber, &pEntries[i]);
807c2c66affSColin Finck         }
808346d12bcSKatayama Hirofumi MZ     }
809c2c66affSColin Finck     else
810c2c66affSColin Finck     {
811c2c66affSColin Finck         skip("SetEnvironmentVariableW failed\n");
812c2c66affSColin Finck     }
813c2c66affSColin Finck 
81483e690cdSKatayama Hirofumi MZ     /* Section 4: set PATHEXT to ".TXT" */
815c2c66affSColin Finck     if (SetEnvironmentVariableW(L"PATHEXT", L".TXT"))
816c2c66affSColin Finck     {
81783e690cdSKatayama Hirofumi MZ         for (i = 0; i < cEntries; ++i)
818346d12bcSKatayama Hirofumi MZ         {
81983e690cdSKatayama Hirofumi MZ             DoEntry(4, pEntries[i].LineNumber, &pEntries[i]);
820c2c66affSColin Finck         }
821346d12bcSKatayama Hirofumi MZ     }
822c2c66affSColin Finck     else
823c2c66affSColin Finck     {
824c2c66affSColin Finck         skip("SetEnvironmentVariableW failed\n");
825c2c66affSColin Finck     }
826c2c66affSColin Finck 
827c2c66affSColin Finck     /* restore PATHEXT */
828c2c66affSColin Finck     SetEnvironmentVariableW(L"PATHEXT", pPathExtSaved);
829c2c66affSColin Finck }
830c2c66affSColin Finck 
START_TEST(PathResolve)831c2c66affSColin Finck START_TEST(PathResolve)
832c2c66affSColin Finck {
833c2c66affSColin Finck     LPWSTR pch;
83483e690cdSKatayama Hirofumi MZ     WCHAR szRoot[MAX_PATH];
835c2c66affSColin Finck 
83683e690cdSKatayama Hirofumi MZ     /* Get this program's path */
83783e690cdSKatayama Hirofumi MZ     GetModuleFileNameW(NULL, s_TestDir, _countof(s_TestDir));
83883e690cdSKatayama Hirofumi MZ 
839a17664ceSKatayama Hirofumi MZ     /* Add '\testdir' to the path */
84083e690cdSKatayama Hirofumi MZ     pch = wcsrchr(s_TestDir, L'\\');
841c2c66affSColin Finck     if (pch == NULL)
842c2c66affSColin Finck     {
843c2c66affSColin Finck         skip("GetModuleFileName and/or wcsrchr are insane.\n");
844c2c66affSColin Finck         return;
845c2c66affSColin Finck     }
846a17664ceSKatayama Hirofumi MZ     lstrcpyW(pch, L"\\testdir");
84783e690cdSKatayama Hirofumi MZ 
848a17664ceSKatayama Hirofumi MZ     /* Create the testdir directory */
84983e690cdSKatayama Hirofumi MZ     CreateDirectoryW(s_TestDir, NULL);
85083e690cdSKatayama Hirofumi MZ     if (GetFileAttributesW(s_TestDir) == INVALID_FILE_ATTRIBUTES)
851c2c66affSColin Finck     {
852a17664ceSKatayama Hirofumi MZ         skip("testdir is not found.\n");
853c2c66affSColin Finck         return;
854c2c66affSColin Finck     }
855c2c66affSColin Finck 
856a17664ceSKatayama Hirofumi MZ     /* Build s_TestDirWithBackslash path */
857a17664ceSKatayama Hirofumi MZ     lstrcpyW(s_TestDirWithBackslash, s_TestDir);
858a17664ceSKatayama Hirofumi MZ     lstrcatW(s_TestDirWithBackslash, L"\\");
859a17664ceSKatayama Hirofumi MZ 
86083e690cdSKatayama Hirofumi MZ     /* Build s_LinkTarget path */
86183e690cdSKatayama Hirofumi MZ     lstrcpyW(s_LinkTarget, s_TestDir);
86283e690cdSKatayama Hirofumi MZ     lstrcatW(s_LinkTarget, L"\\");
86383e690cdSKatayama Hirofumi MZ     lstrcatW(s_LinkTarget, L"2PRONG.txt");
864c2c66affSColin Finck 
86583e690cdSKatayama Hirofumi MZ     /* Create the file */
86683e690cdSKatayama Hirofumi MZ     fclose(_wfopen(s_LinkTarget, L"wb"));
86783e690cdSKatayama Hirofumi MZ     ok(GetFileAttributesW(s_LinkTarget) != INVALID_FILE_ATTRIBUTES, "s_LinkTarget not found\n");
868c2c66affSColin Finck 
869a17664ceSKatayama Hirofumi MZ     /* Build s_LinkTargetWithBackslash path */
870a17664ceSKatayama Hirofumi MZ     lstrcpyW(s_LinkTargetWithBackslash, s_TestDir);
871a17664ceSKatayama Hirofumi MZ     lstrcatW(s_LinkTargetWithBackslash, L"\\");
872a17664ceSKatayama Hirofumi MZ     lstrcatW(s_LinkTargetWithBackslash, L"2PRONG.txt");
873a17664ceSKatayama Hirofumi MZ     lstrcatW(s_LinkTargetWithBackslash, L"\\");
874a17664ceSKatayama Hirofumi MZ 
875346d12bcSKatayama Hirofumi MZ     /* Build s_LinkTargetDoubleBackslash path */
876346d12bcSKatayama Hirofumi MZ     lstrcpyW(s_LinkTargetDoubleBackslash, s_TestDir);
877346d12bcSKatayama Hirofumi MZ     lstrcatW(s_LinkTargetDoubleBackslash, L"\\\\");
878346d12bcSKatayama Hirofumi MZ     lstrcatW(s_LinkTargetDoubleBackslash, L"2PRONG.txt");
879346d12bcSKatayama Hirofumi MZ 
88083e690cdSKatayama Hirofumi MZ     /* Build s_ShortcutLongName path */
88183e690cdSKatayama Hirofumi MZ     lstrcpyW(s_ShortcutLongName, s_TestDir);
88283e690cdSKatayama Hirofumi MZ     lstrcatW(s_ShortcutLongName, L"\\");
88383e690cdSKatayama Hirofumi MZ     lstrcatW(s_ShortcutLongName, L"CmdLineUtils.lnk"); /* in Long File Name */
884c2c66affSColin Finck 
88583e690cdSKatayama Hirofumi MZ     /* Create s_ShortcutLongName shortcut file */
88683e690cdSKatayama Hirofumi MZ     ok(CreateShortcut(s_ShortcutLongName, s_LinkTarget),
887c2c66affSColin Finck        "CreateShortcut(%s, %s) failed.\n",
88883e690cdSKatayama Hirofumi MZ        wine_dbgstr_w(s_ShortcutLongName), wine_dbgstr_w(s_LinkTarget));
889c2c66affSColin Finck 
89083e690cdSKatayama Hirofumi MZ     /* Load shell32.dll */
891c2c66affSColin Finck     s_hShell32 = LoadLibraryA("shell32");
892c2c66affSColin Finck     if (s_hShell32 == NULL)
893c2c66affSColin Finck     {
894c2c66affSColin Finck         skip("Unable to load shell32.\n");
89583e690cdSKatayama Hirofumi MZ         goto Cleanup;
896c2c66affSColin Finck     }
897c2c66affSColin Finck 
89883e690cdSKatayama Hirofumi MZ     /* Get PathResolve procedure */
899c2c66affSColin Finck     s_pPathResolve = (PATHRESOLVE)GetProcAddress(s_hShell32, "PathResolve");
900c2c66affSColin Finck     if (s_pPathResolve == NULL)
901c2c66affSColin Finck     {
902c2c66affSColin Finck         skip("Unable to get PathResolve address.\n");
90383e690cdSKatayama Hirofumi MZ         goto Cleanup;
904c2c66affSColin Finck     }
905c2c66affSColin Finck 
90683e690cdSKatayama Hirofumi MZ     /* Get IsLFNDriveW procedure */
90783e690cdSKatayama Hirofumi MZ     s_pIsLFNDriveW = (ISLFNDRIVEW)GetProcAddress(s_hShell32, (LPCSTR)(INT_PTR)42);
90883e690cdSKatayama Hirofumi MZ     if (s_pIsLFNDriveW == NULL)
90983e690cdSKatayama Hirofumi MZ     {
91083e690cdSKatayama Hirofumi MZ         skip("Unable to get IsLFNDriveW address.\n");
91183e690cdSKatayama Hirofumi MZ         goto Cleanup;
91283e690cdSKatayama Hirofumi MZ     }
91383e690cdSKatayama Hirofumi MZ 
91483e690cdSKatayama Hirofumi MZ     /* Is LFN supported? */
91583e690cdSKatayama Hirofumi MZ     lstrcpyW(szRoot, s_TestDir);
91683e690cdSKatayama Hirofumi MZ     PathStripToRootW(szRoot);
91783e690cdSKatayama Hirofumi MZ     if (!s_pIsLFNDriveW(szRoot))
91883e690cdSKatayama Hirofumi MZ     {
91983e690cdSKatayama Hirofumi MZ         skip("LFN is not supported in this drive %s.\n", wine_dbgstr_w(szRoot));
92083e690cdSKatayama Hirofumi MZ         goto Cleanup;
92183e690cdSKatayama Hirofumi MZ     }
92283e690cdSKatayama Hirofumi MZ 
92383e690cdSKatayama Hirofumi MZ     /* Do tests */
924c2c66affSColin Finck     TestMain_PathResolve();
925c2c66affSColin Finck 
92683e690cdSKatayama Hirofumi MZ     /* Clean up */
92783e690cdSKatayama Hirofumi MZ Cleanup:
92883e690cdSKatayama Hirofumi MZ     DeleteFileW(s_LinkTarget);
92983e690cdSKatayama Hirofumi MZ     DeleteFileW(s_ShortcutLongName);
93083e690cdSKatayama Hirofumi MZ     RemoveDirectoryW(s_TestDir);
931c2c66affSColin Finck     FreeLibrary(s_hShell32);
932c2c66affSColin Finck }
933