32#define HAS_TRAIL_SLASH_A(string) (string[lstrlenA(string)-1]=='\\')
34#define LONGFILE "Long File test.path"
35#define SHORTFILE "pathtest.pth"
36#define SHORTDIR "shortdir"
37#define LONGDIR "Long Directory"
38#define NONFILE_SHORT "noexist.pth"
39#define NONFILE_LONG "NonExistent File"
40#define NONDIR_SHORT "notadir"
41#define NONDIR_LONG "NonExistent Directory"
43#define NOT_A_VALID_DRIVE '@'
47#elif defined __x86_64__
51#elif defined __aarch64__
122 if(pGetLongPathNameA) {
124 "%s: GetLongPathNameA failed\n",
errstr);
127 "%s: GetLongPathNameA should not have a trailing \\\n",
errstr);
130 "%s: GetShortPathNameA failed\n",
errstr);
133 "%s: GetShortPathNameA should not have a trailing \\\n",
errstr);
140 sprintf(fullpath,
"%s\\%s",curdir,subpath);
141 sprintf(fullpathshort,
"%s\\%s",curdirshort,subpath);
142 sprintf(fullpathlong,
"%s\\%s",curdirlong,subpath);
145 ok(
len,
"GetFullPathNameA failed for: '%s'\n",subpath);
148 "%s: GetFullPathNameA should not return a filename ptr\n",
errstr);
150 "%s: GetFullPathNameA returned '%s' instead of '%s'\n",
154 "%s: GetFullPathNameA returned '%s' instead of '%s'\n",
157 "%s: GetFullPathNameA returned '%s' instead of '%s'\n",
172 if(pGetLongPathNameA) {
178 "%s: GetLongPathNameA failed during Short->Long conversion\n",
errstr);
180 "%s: GetLongPathNameA returned '%s' instead of '%s'\n",
181 errstr,tmpstr,fullpathlong);
191 ok(!
lstrcmpiA(fullpathlong, tmpstr),
"%s: GetLongPathNameA returned '%s' instead of '%s'\n",
192 errstr, tmpstr, fullpathlong);
209 for(
i=
len-1;(
i>=0) && (!done);
i--) {
212 else if(
path[
i]==
'\\') {
222 ok(!
error,
"Illegal file found in 8.3 path '%s'\n",
path);
234 "GetShortPathNAmeA did not return an 8.3 path\n");
244 "GetShortPathNameA returned '%s' instead of '%s'\n",
dir,goodstr);
246 "GetShortPathNameA returned '%s' with incorrect extension\n",three);
268 "%s: GetShortPathNameA error: len=%d error=%d tmpstr=[%s]\n",
273 "%s: GetShortPathA should have failed len=%d, error=%d\n",
276 if(pGetLongPathNameA) {
277 ok(passfail.
longlen==0,
"GetLongPathNameA passed when it shouldn't have\n");
280 "%s: GetLongPathA returned %d and not %d\n",
285 "%s: GetLongPathA returned %d and not %d or %d'\n",
302 dirptr=(cmprstr==
NULL) ? newdir : cmprstr;
304 ok(
val,
"%s: SetCurrentDirectoryA failed\n",
errstr);
306 "%s: SetCurrentDirectory did not change the directory, though it passed\n",
309 "%s: SetCurrentDirectory did not change the directory, though it passed\n",
312 "%s: Couldn't set directory to its original value\n",
errstr);
317 "%s: SetCurrentDirectoryA passed when it should have failed\n",
errstr);
319 "%s: SetCurrentDirectory changed the directory, though it failed\n",
322 "%s: SetCurrentDirectory changed the directory, though it failed\n",
343 *curDrive = tmpstr[0];
345 trace(
"Unable to discover current drive, some tests will not be conducted.\n");
351 "GetTempPathA returned a path that did not end in '\\'\n");
355 "GetTempPathA should return string length %d instead of %d\n",
len+1,len1);
359 sprintf(tmpstr,
"pat%.4x.tmp",
id & 0xffff);
360 sprintf(tmpstr1,
"pat%x.tmp",
id & 0xffff);
363 "GetTempFileNameA returned '%s' which doesn't match '%s' or '%s'. id=%x\n",
364 newdir,tmpstr,tmpstr1,
id);
365 ok(
DeleteFileA(newdir),
"Couldn't delete the temporary file we just created\n");
371 sprintf(tmpstr,
"%.4x.tmp",
id & 0xffff);
372 sprintf(tmpstr1,
"%x.tmp",
id & 0xffff);
375 "GetTempFileNameA returned '%s' which doesn't match '%s' or '%s'. id=%x\n",
376 newdir,tmpstr,tmpstr1,
id);
377 ok(
DeleteFileA(newdir),
"Couldn't delete the temporary file we just created\n");
382 sprintf(invalid_dir,
"%s\\%s",tmppath,
"non_existent_dir_1jwj3y32nb3");
399 drives &= ~(1<<(*curDrive-
'A'));
401 for( *otherDrive=
'A'; (drives & 1) == 0; drives>>=1, (*otherDrive)++);
403 trace(
"Could not find alternative drive, some tests will not be conducted.\n");
412 "CreateDirectoryA succeeded even though a file of the same name exists\n");
413 ok(
DeleteFileA(newdir),
"Couldn't delete the temporary file we just created\n");
422 sprintf(tmpstr,
"%c:", *curDrive);
426 "CreateDirectoryA(\"%s\" should have failed (%d)\n", tmpstr,
GetLastError());
427 sprintf(tmpstr,
"%c:\\", *curDrive);
431 "CreateDirectoryA(\"%s\" should have failed (%d)\n", tmpstr,
GetLastError());
470 ok(len1==
len+1,
"GetCurrentDirectoryA returned %d instead of %d\n",len1,
len+1);
472 "GetCurrentDirectoryA should not have modified the buffer\n");
545 sprintf(tmpstr,
"%c:", newdir[0]);
548 sprintf(tmpstr,
"%c:\\", newdir[0]);
609 "GetShortPathNameA failed\n");
611 "GetShortPathNameA should not have a trailing \\\n");
615 "GetShortPathNameA failed\n");
617 "GetShortPathNameA should not have a trailing \\\n");
619 if (pGetLongPathNameA) {
622 rc1=(*pGetLongPathNameA)(tmpstr,
NULL,0);
623 rc2=(*pGetLongPathNameA)(curdir,
NULL,0);
625 "GetLongPathNameA: wrong return code, %d instead of %d\n",
629 rc1=(*pGetLongPathNameA)(
dir,tmpstr,
sizeof(tmpstr));
631 "GetLongPathNameA: returned '%s' instead of '%s' (rc=%d)\n",
640 "GetShortPathNameA returned '%s' instead of '%s'\n",tmpstr,tmpstr1);
649 "GetShortPathNameA returned '%s' instead of '%s'\n",tmpstr,tmpstr1);
662 "GetShortPathNameA error: len=%d error=%d tmpstr=[%s]\n",
664 if(pGetLongPathNameA) {
665 ok(passfail.
longlen==0,
"GetLongPathNameA passed when it shouldn't have\n");
667 "GetlongPathA should have returned 'ERROR_FILE_NOT_FOUND'\n");
671 ok(passfail.
shortlen==0,
"GetShortPathNameA passed when it shouldn't have\n");
675 "GetShortPathA should have returned 'ERROR_FILE_NOT_FOUND'\n");
676 if(pGetLongPathNameA) {
677 ok(passfail.
longlen==0,
"GetLongPathNameA passed when it shouldn't have\n");
679 "GetlongPathA should have returned 'ERROR_FILE_NOT_FOUND'\n");
690 "GetShortPathNameA error: len=%d error=%d tmpstr=[%s]\n",
692 if(pGetLongPathNameA) {
693 ok(passfail.
longlen==0,
"GetLongPathNameA passed when it shouldn't have\n");
695 "GetlongPathA should have returned 'ERROR_FILE_NOT_FOUND'\n");
699 ok(passfail.
shortlen==0,
"GetShortPathNameA passed when it shouldn't have\n");
703 "GetShortPathA should have returned 'ERROR_FILE_NOT_FOUND'\n");
704 if(pGetLongPathNameA) {
705 ok(passfail.
longlen==0,
"GetLongPathNameA passed when it shouldn't have\n");
707 "GetlongPathA should have returned 'ERROR_FILE_NOT_FOUND'\n");
717 "GetShortPathNameA error: len=%d error=%d tmpstr=[%s]\n",
719 if(pGetLongPathNameA) {
720 ok(passfail.
longlen==0,
"GetLongPathNameA passed when it shouldn't have\n");
723 "GetLongPathA returned %d and not 'ERROR_PATH_NOT_FOUND'\n",
728 ok(passfail.
shortlen==0,
"GetShortPathNameA passed when it shouldn't have\n");
732 "GetShortPathA returned %d and not 'ERROR_PATH_NOT_FOUND'\n",
734 if(pGetLongPathNameA) {
735 ok(passfail.
longlen==0,
"GetLongPathNameA passed when it shouldn't have\n");
738 "GetLongPathA returned %d and not 'ERROR_PATH_NOT_FOUND'\n",
743 ok(passfail.
shortlen==0,
"GetShortPathNameA passed when it shouldn't have\n");
747 "GetShortPathA returned %d and not 'ERROR_PATH_NOT_FOUND'\n",
749 if(pGetLongPathNameA) {
750 ok(passfail.
longlen==0,
"GetLongPathNameA passed when it shouldn't have\n");
753 "GetLongPathA returned %d and not 'ERROR_PATH_NOT_FOUND'\n",
758 ok(passfail.
shortlen==0,
"GetShortPathNameA passed when it shouldn't have\n");
762 "GetShortPathA returned %d and not 'ERROR_PATH_NOT_FOUND'\n",
764 if(pGetLongPathNameA) {
765 ok(passfail.
longlen==0,
"GetLongPathNameA passed when it shouldn't have\n");
768 "GetLongPathA returned %d and not 'ERROR_PATH_NOT_FOUND'\n",
780 sprintf(tmpstr2,
"%s\\%s",curdir_short,tmpstr);
785 "GetShortPathNameA error: len=%d error=%d tmpstr=[%s]\n",
787 if(pGetLongPathNameA) {
788 ok(passfail.
longlen==0,
"GetLongPathNameA passed when it shouldn't have\n");
790 "GetLongPathA returned %d and not 'ERROR_FILE_NOT_FOUND'\n",
795 ok(passfail.
shortlen==0,
"GetShortPathNameA passed when it shouldn't have\n");
799 "GetShortPathA returned %d and not 'ERROR_FILE_NOT_FOUND'\n",
801 if(pGetLongPathNameA) {
802 ok(passfail.
longlen==0,
"GetLongPathNameA passed when it shouldn't have\n");
804 "GetLongPathA returned %d and not 'ERROR_FILE_NOT_FOUND'\n",
809 sprintf(tmpstr,
"%c:",curdir[0]);
811 "GetFullPathNameA(%c:) failed\n", curdir[0]);
813 sprintf(tmpstr1,
"%s\\",tmpstr);
815 "GetFullPathNameA(%c:) returned '%s' instead of '%s' or '%s'\n",
816 curdir[0],tmpstr2,tmpstr,tmpstr1);
821 "GetFullPathNameA returned '%s' instead of '%s'\n",tmpstr1,tmpstr);
823 "GetFullPathNameA returned part '%s' instead of '%s'\n",strptr,
SHORTFILE);
830 "GetFullPathNameA returned '%s' instead of '%s'\n",tmpstr1,tmpstr);
832 "GetFullPathNameA returned part '%s' instead of '%s'\n",strptr,
SHORTFILE);
840 "GetFullPathNameA returned '%s' instead of '%s'\n",tmpstr1,tmpstr);
842 "GetFullPathNameA returned part '%s' instead of '%s'\n",strptr,
SHORTFILE);
851 "GetFullPathNameA returned '%s' instead of '%s'\n",tmpstr1,tmpstr);
853 "GetFullPathNameA returned part '%s' instead of '%s'\n",strptr,
SHORTFILE);
857 if (pGetLongPathNameA) {
862 "GetLongPathNameA returned '%s' instead of '%s'\n",tmpstr1,tmpstr);
866 "GetLongPathNameA returned '%s' instead of '%s'\n",tmpstr1,tmpstr);
870 "GetLongPathNameA returned '%s' instead of '%s'\n",tmpstr1,tmpstr);
875 "GetLongPathNameA returned '%s' instead of '%s/%s'\n",tmpstr1,
SHORTDIR,
SHORTFILE);
880 "GetShortPathNameA returned '%s' instead of '%s'\n",tmpstr1,tmpstr);
887 "GetFullPathNameA returned '%s' instead of '%s'\n",tmpstr1,tmpstr);
889 "GetFullPathNameA returned part '%s' instead of '%s'\n",strptr,
SHORTFILE);
895 "GetFullPathNameA returned '%s' instead of '%s'\n",tmpstr1,tmpstr);
898 "GetFullPathNameA returned part '%s' instead of '%s'\n",strptr,
SHORTFILE);
903 if(pGetLongPathNameA) {
904 ok(pGetLongPathNameA(tmpstr,tmpstr1,
MAX_PATH),
"GetLongPathNameA failed\n");
906 "GetLongPathNameA returned '%s' instead of '%s'\n",tmpstr1,
LONGDIR);
912 "GetShortPathNameA did not keep relative directory [%s]\n",tmpstr1);
913 if(pGetLongPathNameA) {
914 ok(pGetLongPathNameA(tmpstr1,tmpstr1,
MAX_PATH),
"GetLongPathNameA failed %s\n",
917 "GetLongPathNameA returned '%s' instead of '%s'\n",tmpstr1,tmpstr);
954 "GetShortPathNameA returned '%s' instead of '%s'\n",tmpstr1,tmpstr);
958 "GetShortPathNameA returned '%s' instead of '%s'\n",tmpstr1,tmpstr);
960 if (pGetLongPathNameA) {
962 ok(pGetLongPathNameA(tmpstr,tmpstr1,
MAX_PATH),
"GetLongPathNameA failed\n");
964 "GetLongPathNameA returned '%s' instead of '%s'\n",tmpstr1,tmpstr);
967 ok(pGetLongPathNameA(tmpstr,tmpstr1,
MAX_PATH),
"GetLongPathNameA failed\n");
969 "GetLongPathNameA returned '%s' instead of '%s'\n",tmpstr1,tmpstr);
978 len_with_null =
strlen(tmp_dir) + 1;
984 ok(
len ==
strlen(
buf),
"returned length should be equal to the length of string\n");
994 ok(
len >= len_with_null,
"Expected >= %u, got %u\n", len_with_null,
len);
997 ok(
len >= len_with_null,
"Expected >= %u, got %u\n", len_with_null,
len);
1005 ok(
len ==
strlen(
buf),
"returned length should be equal to the length of string\n");
1010 ok(
len ==
strlen(
buf),
"returned length should be equal to the length of string\n");
1020 "expected %d, got %d\n", slen,
len);
1030 static const WCHAR fooW[] = {
'f',
'o',
'o',0};
1033 len_with_null =
lstrlenW(tmp_dirW) + 1;
1048 win_skip(
"GetTempPathW is not available\n");
1051 ok(
lstrcmpiW(
buf, tmp_dirW) == 0,
"GetTempPathW returned an incorrect temporary path\n");
1052 ok(
len ==
lstrlenW(
buf),
"returned length should be equal to the length of string\n");
1056 ok(
buf[0] == 0,
"unicode version should truncate the buffer to zero size\n");
1057 ok(
len >= len_with_null,
"Expected >= %u, got %u\n", len_with_null,
len);
1060 ok(
len >= len_with_null,
"Expected >= %u, got %u\n", len_with_null,
len);
1064 ok(
lstrcmpiW(
buf, tmp_dirW) == 0,
"GetTempPathW returned an incorrect temporary path\n");
1065 ok(
len ==
lstrlenW(
buf),
"returned length should be equal to the length of string\n");
1070 ok(
lstrcmpiW(
buf, tmp_dirW) == 0,
"GetTempPathW returned an incorrect temporary path\n");
1071 ok(
len ==
lstrlenW(
buf),
"returned length should be equal to the length of string\n");
1082 "expected %d, got %d\n", slen,
len);
1108 skip(
"Could not allocate memory for the test\n");
1112 long_buf[
len] = 0xCC;
1114 ok(
lstrcmpiW(long_buf, tmp_dirW) == 0,
"GetTempPathW returned an incorrect temporary path\n");
1115 ok(
len ==
lstrlenW(long_buf),
"returned length should be equal to the length of string\n");
1121 for(;
len < 32767;
len++)
1122 ok(long_buf[
len] ==
'\0',
"expected NULL at [%d], got 0x%x\n",
len, long_buf[
len]);
1126 ok(long_buf[
len] == 0xcc,
"expected 0xcc at [%d], got 0x%x\n",
len, long_buf[
len]);
1141 trace(
"TMP=%s\n", save_TMP);
1196 if (!pGetLongPathNameA)
1205 ok(!
length,
"GetLongPathNameA should fail\n");
1215 length = pGetLongPathNameA(tempfile, temppath, 4);
1218 ok(temppath[0] == 0,
"Buffer should not have been touched\n");
1229 length = pGetLongPathNameA(temppath2,
NULL, 0);
1232 win_skip(
"UNC syntax tests don't work on Win98/WinMe\n");
1236 ok(
length == explength,
"Wrong length %d, expected %d\n",
length, explength);
1239 ok(
length == explength,
"Wrong length %d, expected %d\n",
length, explength);
1241 length = pGetLongPathNameA(temppath2, temppath, 4);
1242 ok(
length == explength,
"Wrong length %d, expected %d\n",
length, explength);
1243 ok(temppath[0] == 0,
"Buffer should not have been touched\n");
1247 hostsize =
sizeof(unc_prefix) - 2;
1255 unc_short[
lstrlenA(unc_short)] = temppath[0];
1261 pGetLongPathNameA(tempfile, temppath,
MAX_PATH);
1263 longpath[
lstrlenA(longpath)] = temppath[0];
1269 length = pGetLongPathNameA(unc_short,
NULL, 0);
1273 win_skip(
"UNC with computername is not supported\n");
1277 explength =
lstrlenA(longpath) + 1;
1279 ok(
length == explength,
"Wrong length %d, expected %d\n",
length, explength);
1283 ok(
length == explength,
"Wrong length %d, expected %d\n",
length, explength);
1286 length = pGetLongPathNameA(unc_short, unc_long,
lstrlenA(unc_short));
1289 ok(
length == explength,
"Wrong length %d, expected %d\n",
length, explength);
1290 ok(unc_long[0] == 0,
"Buffer should not have been touched\n");
1293 length = pGetLongPathNameA(unc_short, unc_long,
length);
1298 ok(
length == explength,
"Wrong length %d, expected %d\n",
length, explength);
1299 ok(!
lstrcmpiA(unc_long, longpath),
"Expected (%s), got (%s)\n", longpath, unc_long);
1314 static const WCHAR prefix[] = {
'\\',
'\\',
'?',
'\\', 0};
1315 static const WCHAR backslash[] = {
'\\', 0};
1316 static const WCHAR letterX[] = {
'X', 0};
1318 if (!pGetLongPathNameW)
1325 win_skip(
"GetLongPathNameW is not implemented\n");
1328 ok(0==
length,
"GetLongPathNameW returned %d but expected 0\n",
length);
1334 ok(0==
length,
"GetLongPathNameW returned %d but expected 0\n",
length);
1364 "Expected ERROR_PATH_NOT_FOUND, got %d\n",
GetLastError());
1372 "Expected ERROR_PATH_NOT_FOUND, got %d\n",
GetLastError());
1378 "Could not create the temporary file : %d.\n",
GetLastError());
1395 ok(
length == expanded,
"Expected %d, got %d\n", expanded,
length);
1407 static const WCHAR extended_prefix[] = {
'\\',
'\\',
'?',
'\\',0};
1408 static const WCHAR test_path[] = {
'L',
'o',
'n',
'g',
'D',
'i',
'r',
'e',
'c',
't',
'o',
'r',
'y',
'N',
'a',
'm',
'e', 0 };
1409 static const WCHAR name[] = {
't',
'e',
's',
't', 0 };
1410 static const WCHAR backSlash[] = {
'\\', 0 };
1411 static const WCHAR a_bcdeW[] = {
'a',
'.',
'b',
'c',
'd',
'e',0};
1412 static const WCHAR wildW[] = {
'*',0 };
1423 win_skip(
"GetTempPathW is not implemented\n");
1442 ok(
length,
"GetShortPathNameW returned 0.\n" );
1448 ok(
length,
"GetShortPathNameW returned 0.\n" );
1457 ok(!
length,
"GetShortPathNameW should fail\n");
1464 ok(
ret,
"Cannot delete file.\n" );
1478 ok(!
length,
"GetShortPathNameW should fail\n");
1483 ok(
ret,
"Cannot delete file.\n" );
1488 ok(
ret,
"Cannot delete directory.\n" );
1513 "returned %d with %d (expected '%d' or: '0' with "
1523 "returned %d with %d and '%s' (expected '%d' and a string)\n",
1531 "returned %d with %d and '%s' (expected '%d' and a string)\n",
1539 ok(
res ==
total,
"returned %d with %d and '%s' (expected '%d')\n",
1547 ok(
res ==
total,
"returned %d with %d and '%s' (expected '%d')\n",
1572 "returned %d with %d (expected '%d' or: '0' with "
1582 "returned %d with %d and '%s' (expected '%d' and a string)\n",
1590 "returned %d with %d and '%s' (expected '%d' and a string)\n",
1598 ok(
res ==
total,
"returned %d with %d and '%s' (expected '%d')\n",
1606 ok(
res ==
total,
"returned %d with %d and '%s' (expected '%d')\n",
1612 if (!pNeedCurrentDirectoryForExePathA)
1614 win_skip(
"NeedCurrentDirectoryForExePathA is not available\n");
1620 pNeedCurrentDirectoryForExePathA(
NULL);
1623 ok(pNeedCurrentDirectoryForExePathA(
"."),
"returned FALSE for \".\"\n");
1624 ok(pNeedCurrentDirectoryForExePathA(
"c:\\"),
"returned FALSE for \"c:\\\"\n");
1625 ok(pNeedCurrentDirectoryForExePathA(
"cmd.exe"),
"returned FALSE for \"cmd.exe\"\n");
1628 ok(!pNeedCurrentDirectoryForExePathA(
"."),
"returned TRUE for \".\"\n");
1629 ok(pNeedCurrentDirectoryForExePathA(
"c:\\"),
"returned FALSE for \"c:\\\"\n");
1630 ok(!pNeedCurrentDirectoryForExePathA(
"cmd.exe"),
"returned TRUE for \"cmd.exe\"\n");
1635 const WCHAR thispath[] = {
'.', 0};
1636 const WCHAR fullpath[] = {
'c',
':',
'\\', 0};
1637 const WCHAR cmdname[] = {
'c',
'm',
'd',
'.',
'e',
'x',
'e', 0};
1639 if (!pNeedCurrentDirectoryForExePathW)
1641 win_skip(
"NeedCurrentDirectoryForExePathW is not available\n");
1647 pNeedCurrentDirectoryForExePathW(
NULL);
1650 ok(pNeedCurrentDirectoryForExePathW(thispath),
"returned FALSE for \".\"\n");
1651 ok(pNeedCurrentDirectoryForExePathW(fullpath),
"returned FALSE for \"c:\\\"\n");
1652 ok(pNeedCurrentDirectoryForExePathW(cmdname),
"returned FALSE for \"cmd.exe\"\n");
1655 ok(!pNeedCurrentDirectoryForExePathW(thispath),
"returned TRUE for \".\"\n");
1656 ok(pNeedCurrentDirectoryForExePathW(fullpath),
"returned FALSE for \"c:\\\"\n");
1657 ok(!pNeedCurrentDirectoryForExePathW(cmdname),
"returned TRUE for \"cmd.exe\"\n");
1669#define is_upper_case_letter(a) ((a) >= 'A' && (a) <= 'Z')
1675 ok(
ret <
sizeof(
buf),
"buffer should be %u bytes\n",
ret);
1676 ok(
buf[1] ==
':',
"expected buf[1] == ':' got %c\n",
buf[1]);
1684 ok(
ret <
sizeof(
buf),
"buffer should be %u bytes\n",
ret);
1685 ok(
buf[1] ==
':',
"expected buf[1] == ':' got %c\n",
buf[1]);
1692 ok(
ret <
sizeof(
buf),
"buffer should be %u bytes\n",
ret);
1693 ok(
buf[1] ==
':',
"expected buf[1] == ':' got %c\n",
buf[1]);
1700 ok(
ret <
sizeof(
buf),
"buffer should be %u bytes\n",
ret);
1701 ok(
buf[1] ==
':',
"expected buf[1] == ':' got %c\n",
buf[1]);
1709 ok(
ret <
sizeof(
buf),
"buffer should be %u bytes\n",
ret);
1712 ok(
buf[1] ==
':',
"expected buf[1] == ':' got %c\n",
buf[1]);
1713 ok(
buf[
strlen(
buf)-1] ==
'\\',
"Temporary path (%s) doesn't end in a slash\n",
buf);
1720 ok(
ret <
sizeof(
buf),
"buffer should be %u bytes\n",
ret);
1721 ok(
buf[1] ==
':',
"expected buf[1] == ':' got %c\n",
buf[1]);
1728 ok(
ret <
sizeof(
buf),
"buffer should be %u bytes\n",
ret);
1729 ok(
buf[1] ==
':',
"expected buf[1] == ':' got %c\n",
buf[1]);
1732 if (pGetLongPathNameA)
1738 ok(
ret <
sizeof(
buf),
"buffer should be %u bytes\n",
ret);
1739 ok(
buf[1] ==
':',
"expected buf[1] == ':' got %c\n",
buf[1]);
1742#undef is_upper_case_letter
1746"<assembly xmlns=\"urn:schemas-microsoft-com:asm.v1\" manifestVersion=\"1.0\">"
1747"<assemblyIdentity version=\"1.2.3.4\" name=\"testdep1\" type=\"win32\" processorArchitecture=\"" ARCH "\"/>"
1748" <file name=\"testdep.dll\" />"
1749" <file name=\"ole32\" />"
1750" <file name=\"kernel32.dll\" />"
1754"<assembly xmlns=\"urn:schemas-microsoft-com:asm.v1\" manifestVersion=\"1.0\">"
1755"<assemblyIdentity version=\"1.2.3.4\" name=\"Wine.Test\" type=\"win32\" />"
1757" <dependentAssembly>"
1758" <assemblyIdentity type=\"win32\" name=\"testdep1\" version=\"1.2.3.4\" processorArchitecture=\"" ARCH "\" />"
1759" </dependentAssembly>"
1800 actctx.cbSize =
sizeof(ACTCTXW);
1809 ok(
actctx.wProcessorArchitecture == 0,
"wProcessorArchitecture=%d\n",
actctx.wProcessorArchitecture);
1811 ok(
actctx.lpAssemblyDirectory ==
NULL,
"lpAssemblyDirectory=%p\n",
actctx.lpAssemblyDirectory);
1813 ok(
actctx.lpApplicationName ==
NULL,
"lpApplicationName=%p\n",
actctx.lpApplicationName);
1821 static const CHAR testdepA[] =
"testdep.dll";
1822 static const CHAR testdeprelA[] =
"./testdep.dll";
1823 static const CHAR kernel32A[] =
"kernel32.dll";
1824 static const CHAR fileA[] =
"";
1834 win_skip(
"SearchPathA isn't available\n");
1843 ok(
ret == 0,
"Expected failure, got %d\n",
ret);
1845 "Expected ERROR_INVALID_PARAMETER, got %x\n",
GetLastError());
1849 ret = pSearchPathA(
pathA, fileA,
NULL,
sizeof(buffA)/
sizeof(
CHAR), buffA, &ptrA);
1850 ok(
ret == 0,
"Expected failure, got %d\n",
ret);
1852 "Expected ERROR_INVALID_PARAMETER, got %x\n",
GetLastError());
1854 if (!pActivateActCtx)
1878 ret = pSearchPathA(
NULL,
"testdep.dll",
".ext",
sizeof(buffA)/
sizeof(
CHAR), buffA,
NULL);
1881 ret = pSearchPathA(
NULL,
"testdep",
".dll",
sizeof(buffA)/
sizeof(
CHAR), buffA,
NULL);
1884 ret = pSearchPathA(
NULL,
"testdep",
".ext",
sizeof(buffA)/
sizeof(
CHAR), buffA,
NULL);
1898 ok(
strcmp(buffA, path2A),
"got wrong path %s, %s\n", buffA, path2A);
1907 ok(
ret,
"failed to obtain working directory.\n");
1912 ok(bret != 0,
"failed to copy test executable to temp directory, %u\n",
GetLastError());
1913 sprintf(path3A,
"%s%s%s", curdirA, curdirA[
strlen(curdirA)-1] !=
'\\' ?
"\\" :
"", kernel32A);
1915 ok(bret != 0,
"failed to copy test executable to launch directory, %u\n",
GetLastError());
1917 ok(bret,
"failed to change working directory\n");
1918 ret = pSearchPathA(
NULL, kernel32A,
".exe",
sizeof(buffA), buffA,
NULL);
1920 ok(
strcmp(buffA, path3A) == 0,
"expected %s, got %s\n", path3A, buffA);
1922 ok(bret,
"failed to reset working directory\n");
1929 static const WCHAR testdeprelW[] = {
'.',
'/',
't',
'e',
's',
't',
'd',
'e',
'p',
'.',
'd',
'l',
'l',0};
1930 static const WCHAR testdepW[] = {
't',
'e',
's',
't',
'd',
'e',
'p',
'.',
'd',
'l',
'l',0};
1931 static const WCHAR testdep1W[] = {
't',
'e',
's',
't',
'd',
'e',
'p',0};
1932 static const WCHAR kernel32dllW[] = {
'k',
'e',
'r',
'n',
'e',
'l',
'3',
'2',
'.',
'd',
'l',
'l',0};
1933 static const WCHAR kernel32W[] = {
'k',
'e',
'r',
'n',
'e',
'l',
'3',
'2',0};
1934 static const WCHAR ole32W[] = {
'o',
'l',
'e',
'3',
'2',0};
1935 static const WCHAR extW[] = {
'.',
'e',
'x',
't',0};
1936 static const WCHAR dllW[] = {
'.',
'd',
'l',
'l',0};
1946 win_skip(
"SearchPathW isn't available\n");
1953 pSearchPathW(pathW,
NULL,
NULL,
sizeof(buffW)/
sizeof(
WCHAR), buffW, &ptrW);
1960 ret = pSearchPathW(pathW,
fileW,
NULL,
sizeof(buffW)/
sizeof(
WCHAR), buffW, &ptrW);
1961 ok(
ret == 0,
"Expected failure, got %d\n",
ret);
1963 "Expected ERROR_INVALID_PARAMETER, got %x\n",
GetLastError());
1965 if (!pActivateActCtx)
1984 ret = pSearchPathW(pathW, kernel32W,
NULL,
sizeof(path2W)/
sizeof(
WCHAR), path2W,
NULL);
1996 ret = pSearchPathW(
NULL, testdepW, extW,
sizeof(buffW)/
sizeof(
WCHAR), buffW,
NULL);
2002 ret = pSearchPathW(
NULL, testdep1W, extW,
sizeof(buffW)/
sizeof(
WCHAR), buffW,
NULL);
2010 ret = pSearchPathW(pathW, testdepW,
NULL,
sizeof(buffW)/
sizeof(
WCHAR), buffW,
NULL);
2040 } invalid_parameters[] =
2052 for (
i = 0;
i <
sizeof(invalid_parameters)/
sizeof(invalid_parameters[0]);
i++)
2055 strcpy(output,
"deadbeef");
2056 filepart = (
char *)0xdeadbeef;
2058 invalid_parameters[
i].
len,
2060 invalid_parameters[
i].lastpart);
2061 ok(!
ret,
"[%d] Expected GetFullPathNameA to return 0, got %u\n",
i,
ret);
2062 ok(!
strcmp(output,
"deadbeef"),
"[%d] Expected the output buffer to be unchanged, got \"%s\"\n",
i, output);
2063 ok(filepart == (
char *)0xdeadbeef,
"[%d] Expected output file part pointer to be untouched, got %p\n",
i, filepart);
2066 "[%d] Expected GetLastError() to return 0xdeadbeef, got %u\n",
2072 skip(
"Skipping DBCS(Japanese) GetFullPathNameA test in this codepage (%d)\n", acp);
2074 const struct dbcs_case {
2078 {
"c:\\a\\\x95\x5c\x97\xa0.txt",
"\x95\x5c\x97\xa0.txt" },
2079 {
"c:\\\x83\x8f\x83\x43\x83\x93\\wine.c",
"wine.c" },
2080 {
"c:\\demo\\\x97\xa0\x95\x5c",
"\x97\xa0\x95\x5c" }
2082 for (
i = 0;
i <
sizeof(testset)/
sizeof(testset[0]);
i++) {
2087 "[%d] expected %s got %s\n",
i, testset[
i].
expected, filepart);
2095 static const WCHAR deadbeefW[] = {
'd',
'e',
'a',
'd',
'b',
'e',
'e',
'f',0};
2108 } invalid_parameters[] =
2126 win_skip(
"GetFullPathNameW is not available\n");
2130 for (
i = 0;
i <
sizeof(invalid_parameters)/
sizeof(invalid_parameters[0]);
i++)
2134 filepart = (
WCHAR *)0xdeadbeef;
2136 invalid_parameters[
i].
len,
2138 invalid_parameters[
i].lastpart);
2139 ok(!
ret,
"[%d] Expected GetFullPathNameW to return 0, got %u\n",
i,
ret);
2140 ok(!
lstrcmpW(output, deadbeefW),
"[%d] Expected the output buffer to be unchanged, got %s\n",
i,
wine_dbgstr_w(output));
2141 ok(filepart == (
WCHAR *)0xdeadbeef ||
2142 (invalid_parameters[
i].win7_expect && filepart ==
NULL),
2143 "[%d] Expected output file part pointer to be untouched, got %p\n",
i, filepart);
2146 "[%d] Expected GetLastError() to return 0xdeadbeef, got %u\n",
2155#define MAKEFUNC(f) (p##f = (void*)GetProcAddress(hKernel32, #f))
2180 if (!pGetLongPathNameA)
return;
2221 ok(!
strcmp(
buf,
"..\\foo\\file"),
"expected ..\\foo\\file, got %s\n",
buf);
2225 ok(!
strcmp(
buf,
"..\\foo\\file"),
"expected ..\\foo\\file, got %s\n",
buf);
2230 ok(!
strcmp(
buf,
".\\..\\foo\\file"),
"expected .\\..\\foo\\file, got %s\n",
buf);
2234 ok(!
strcmp(
buf,
".\\..\\foo\\file"),
"expected .\\..\\foo\\file, got %s\n",
buf);
2240 ok(!
strcmp(
buf,
"..\\\\foo\\file"),
"expected ..\\\\foo\\file, got %s\n",
buf);
2244 ok(!
strcmp(
buf,
"..\\\\foo\\file"),
"expected ..\\\\foo\\file, got %s\n",
buf);
2255 static const WCHAR has_driveW[] = {
'C',
':',
'\\',
'a',
'.',
't',
'x',
't',0};
2256 static const WCHAR has_pathW[] = {
'b',
'\\',
'a',
'.',
't',
'x',
't',0};
2257 static const WCHAR too_longW[] = {
'a',
'l',
'o',
'n',
'g',
'f',
'i',
'l',
'e',
'n',
'a',
'm',
'e',
'.',
't',
'x',
't',0};
2258 static const WCHAR twodotsW[] = {
't',
'e',
's',
't',
'.',
'e',
's',
't',
'.',
't',
'x',
't',0};
2259 static const WCHAR longextW[] = {
't',
'e',
's',
't',
'.',
't',
'x',
't',
't',
'x',
't',0};
2261 static const WCHAR funnycharsW[] = {
'!',
'#',
'$',
'%',
'&',
'\'',
'(',
')',
'.',
'-',
'@',
'^',0};
2262 static const WCHAR length8W[] = {
't',
'e',
's',
't',
't',
'e',
's',
't',
'.',
't',
'x',
't',0};
2263 static const WCHAR length1W[] = {
't',0};
2264 static const WCHAR withspaceW[] = {
't',
'e',
's',
't',
' ',
'e',
's',
't',
'.',
't',
'x',
't',0};
2266 static const struct {
2268 BOOL should_be_legal, has_space;
2282 BOOL br, is_legal, has_space;
2286 if(!pCheckNameLegalDOS8Dot3W){
2287 win_skip(
"Missing CheckNameLegalDOS8Dot3, skipping tests\n");
2291 br = pCheckNameLegalDOS8Dot3W(
NULL,
NULL, 0,
NULL, &is_legal);
2292 ok(br ==
FALSE,
"CheckNameLegalDOS8Dot3W should have failed\n");
2294 br = pCheckNameLegalDOS8Dot3A(
NULL,
NULL, 0,
NULL, &is_legal);
2295 ok(br ==
FALSE,
"CheckNameLegalDOS8Dot3A should have failed\n");
2297 br = pCheckNameLegalDOS8Dot3W(length8W,
NULL, 0,
NULL,
NULL);
2298 ok(br ==
FALSE,
"CheckNameLegalDOS8Dot3W should have failed\n");
2300 br = pCheckNameLegalDOS8Dot3A(
"testtest.txt",
NULL, 0,
NULL,
NULL);
2301 ok(br ==
FALSE,
"CheckNameLegalDOS8Dot3A should have failed\n");
2303 for(
i = 0;
i <
sizeof(cases)/
sizeof(*cases); ++
i){
2304 br = pCheckNameLegalDOS8Dot3W(cases[
i].
name,
NULL, 0, &has_space, &is_legal);
2306 ok(is_legal == cases[
i].should_be_legal,
"Got wrong legality for %s\n",
wine_dbgstr_w(cases[
i].
name));
2312 br = pCheckNameLegalDOS8Dot3A(astr,
NULL, 0, &has_space, &is_legal);
2313 ok(br ==
TRUE,
"CheckNameLegalDOS8Dot3W failed for %s\n", astr);
2314 ok(is_legal == cases[
i].should_be_legal,
"Got wrong legality for %s\n", astr);
2326 if (!pSetSearchPathMode)
2328 win_skip(
"SetSearchPathMode isn't available\n" );
2337 ok(
ret,
"failed to switch to %s\n",
dir );
2348 ret = pSetSearchPathMode( 0 );
2349 ok( !
ret,
"SetSearchPathMode succeeded\n" );
2353 ret = pSetSearchPathMode( 0x80 );
2354 ok( !
ret,
"SetSearchPathMode succeeded\n" );
2359 ok( !
ret,
"SetSearchPathMode succeeded\n" );
2393 ok( !
ret,
"SetSearchPathMode succeeded\n" );
2402 ok( !
ret,
"SetSearchPathMode succeeded\n" );
2407 ok( !
ret,
"SetSearchPathMode succeeded\n" );
2433 if (!pGetLongPathNameA)
2434 win_skip(
"GetLongPathNameA is not available\n");
2435 if (!pGetLongPathNameW)
2436 win_skip(
"GetLongPathNameW is not available\n");
2437 if (!pActivateActCtx)
2438 win_skip(
"Activation contexts not supported, some tests will be skipped\n");
char * strcat(char *DstString, const char *SrcString)
int strcmp(const char *String1, const char *String2)
ACPI_SIZE strlen(const char *String)
char * strcpy(char *DstString, const char *SrcString)
char * strchr(const char *String, int ch)
static const WCHAR dllW[]
static const WCHAR empty[]
#define ERROR_CALL_NOT_IMPLEMENTED
#define ERROR_INVALID_PARAMETER
#define GetCurrentDirectoryW(x, y)
#define INVALID_HANDLE_VALUE
#define CreateFileA(a, b, c, d, e, f, g)
#define HeapFree(x, y, z)
#define FILE_ATTRIBUTE_NORMAL
#define WideCharToMultiByte
#define GetEnvironmentVariableA(x, y, z)
#define MultiByteToWideChar
#define ERROR_ACCESS_DENIED
#define ERROR_INVALID_NAME
static const WCHAR *const ext[]
static const WCHAR version[]
VOID WINAPI ReleaseActCtx(IN HANDLE hActCtx)
BOOL WINAPI DeactivateActCtx(IN DWORD dwFlags, IN ULONG_PTR ulCookie)
BOOL WINAPI GetCurrentActCtx(OUT PHANDLE phActCtx)
BOOL WINAPI ActivateActCtx(IN HANDLE hActCtx, OUT PULONG_PTR ulCookie)
BOOL WINAPI DECLSPEC_HOTPATCH SetEnvironmentVariableA(IN LPCSTR lpName, IN LPCSTR lpValue)
BOOL WINAPI CopyFileA(IN LPCSTR lpExistingFileName, IN LPCSTR lpNewFileName, IN BOOL bFailIfExists)
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
BOOL WINAPI RemoveDirectoryA(IN LPCSTR lpPathName)
BOOL WINAPI CreateDirectoryW(IN LPCWSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
BOOL WINAPI RemoveDirectoryW(IN LPCWSTR lpPathName)
BOOL WINAPI CreateDirectoryA(IN LPCSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
DWORD WINAPI GetFileAttributesA(LPCSTR lpFileName)
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
DWORD WINAPI GetCurrentDirectoryA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
DWORD WINAPI GetShortPathNameA(IN LPCSTR lpszLongPath, OUT LPSTR lpszShortPath, IN DWORD cchBuffer)
DWORD WINAPI SearchPathA(IN LPCSTR lpPath OPTIONAL, IN LPCSTR lpFileName, IN LPCSTR lpExtension OPTIONAL, IN DWORD nBufferLength, OUT LPSTR lpBuffer, OUT LPSTR *lpFilePart OPTIONAL)
BOOL WINAPI NeedCurrentDirectoryForExePathA(IN LPCSTR ExeName)
DWORD WINAPI GetTempPathW(IN DWORD count, OUT LPWSTR path)
UINT WINAPI GetWindowsDirectoryA(OUT LPSTR lpBuffer, IN UINT uSize)
DWORD WINAPI GetLongPathNameA(IN LPCSTR lpszShortPath, OUT LPSTR lpszLongPath, IN DWORD cchBuffer)
BOOL WINAPI SetCurrentDirectoryW(IN LPCWSTR lpPathName)
DWORD WINAPI SearchPathW(IN LPCWSTR lpPath OPTIONAL, IN LPCWSTR lpFileName, IN LPCWSTR lpExtension OPTIONAL, IN DWORD nBufferLength, OUT LPWSTR lpBuffer, OUT LPWSTR *lpFilePart OPTIONAL)
DWORD WINAPI GetFullPathNameA(IN LPCSTR lpFileName, IN DWORD nBufferLength, OUT LPSTR lpBuffer, OUT LPSTR *lpFilePart)
UINT WINAPI GetSystemDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
DWORD WINAPI GetLongPathNameW(IN LPCWSTR lpszShortPath, OUT LPWSTR lpszLongPath, IN DWORD cchBuffer)
DWORD WINAPI GetShortPathNameW(IN LPCWSTR lpszLongPath, OUT LPWSTR lpszShortPath, IN DWORD cchBuffer)
BOOL WINAPI SetCurrentDirectoryA(IN LPCSTR lpPathName)
DWORD WINAPI GetFullPathNameW(IN LPCWSTR lpFileName, IN DWORD nBufferLength, OUT LPWSTR lpBuffer, OUT LPWSTR *lpFilePart)
BOOL WINAPI NeedCurrentDirectoryForExePathW(IN LPCWSTR ExeName)
UINT WINAPI GetWindowsDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
DWORD WINAPI GetTempPathA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
UINT WINAPI GetSystemDirectoryA(OUT LPSTR lpBuffer, IN UINT uSize)
HANDLE WINAPI CreateActCtxW(PCACTCTXW pActCtx)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
int WINAPI lstrcmpA(LPCSTR str1, LPCSTR str2)
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
int WINAPI lstrcmpiA(LPCSTR str1, LPCSTR str2)
static const WCHAR fileW[]
BOOL WINAPI CheckNameLegalDOS8Dot3W(LPCWSTR lpName, LPSTR lpOemName OPTIONAL, DWORD OemNameSize OPTIONAL, PBOOL pbNameContainsSpaces OPTIONAL, PBOOL pbNameLegal)
UINT WINAPI GetTempFileNameA(IN LPCSTR lpPathName, IN LPCSTR lpPrefixString, IN UINT uUnique, OUT LPSTR lpTempFileName)
BOOL WINAPI CheckNameLegalDOS8Dot3A(LPCSTR lpName, LPSTR lpOemName OPTIONAL, DWORD OemNameSize OPTIONAL, PBOOL pbNameContainsSpaces OPTIONAL, PBOOL pbNameLegal)
GLenum GLuint GLenum GLsizei const GLchar * buf
GLuint GLsizei GLsizei * length
GLenum GLenum GLenum input
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
static const WCHAR emptyW[]
__cdecl __MINGW_NOTHROW char * dirname(char *)
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
LPSTR WINAPI lstrcatA(LPSTR lpString1, LPCSTR lpString2)
int WINAPI lstrlenA(LPCSTR lpString)
#define ERROR_ALREADY_EXISTS
#define ERROR_FILE_NOT_FOUND
#define sprintf(buf, format,...)
static char shortpath[MAX_PATH]
static void test_create(void)
#define expect(expected, got)
static WCHAR manifest_path[MAX_PATH]
static const WCHAR fooW[]
static const CHAR is_char_ok[]
static const CHAR funny_chars[]
static void test_PathNameA(CHAR *curdir, CHAR curDrive, CHAR otherDrive)
static const char manifest_dep[]
static void test_GetTempPathA(char *tmp_dir)
static void test_GetLongPathNameA(void)
static void test_GetFullPathNameA(void)
#define HAS_TRAIL_SLASH_A(string)
static void test_drive_letter_case(void)
static void test_GetSystemDirectory(void)
static void test_ShortPathCase(const char *tmpdir, const char *dirname, const char *filename)
static void test_GetWindowsDirectory(void)
static void test_setdir(CHAR *olddir, CHAR *newdir, CHAR *cmprstr, INT pass, const CHAR *errstr)
static void test_FunnyChars(CHAR *curdir, CHAR *curdir_short, CHAR *filename, INT valid, CHAR *errstr)
static void test_GetTempPathW(char *tmp_dir)
static void test_SetSearchPathMode(void)
static void create_manifest_file(const char *filename, const char *manifest)
static void test_relative_path(void)
static void test_GetTempPath(void)
static void test_SplitShortPathA(CHAR *path, CHAR *dir, CHAR *eight, CHAR *three)
static void delete_manifest_file(const char *filename)
static void test_CurrentDirectoryA(CHAR *origdir, CHAR *newdir)
static void test_GetFullPathNameW(void)
static void test_LongtoShortA(CHAR *teststr, const CHAR *goodstr, const CHAR *ext, const CHAR *errstr)
static void test_GetLongPathNameW(void)
static void test_SearchPathA(void)
static void test_GetShortPathNameW(void)
static void test_SearchPathW(void)
#define is_upper_case_letter(a)
static LPSTR *static LPCWSTR
static void test_CleanupPathA(CHAR *origdir, CHAR *curdir)
static void init_pointers(void)
#define NOT_A_VALID_DRIVE
static void test_ValidPathA(const CHAR *curdir, const CHAR *subdir, const CHAR *filename, CHAR *shortstr, SLpassfail *passfail, const CHAR *errstr)
static void test_CheckNameLegalDOS8Dot3(void)
static void test_NeedCurrentDirectoryForExePathA(void)
static void test_NeedCurrentDirectoryForExePathW(void)
static void test_InitPathA(CHAR *newdir, CHAR *curDrive, CHAR *otherDrive)
static const char manifest_main[]
DWORD WINAPI GetVersion()
BOOL WINAPI SHIM_OBJ_NAME() GetComputerNameA(LPSTR lpBuffer, LPDWORD lpnSize)
static char tmpdir[MAX_PATH]
static const CHAR manifest[]
#define INVALID_FILE_ATTRIBUTES
const char * errstr(int errcode)
DWORD WINAPI GetLastError(void)
#define BASE_SEARCH_PATH_DISABLE_SAFE_SEARCHMODE
DWORD WINAPI GetLogicalDrives(void)
#define BASE_SEARCH_PATH_PERMANENT
#define BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE
#define ERROR_BAD_NETPATH
#define ERROR_PATH_NOT_FOUND
#define ERROR_BAD_NET_NAME