50 {
"file:c:/foo/bar",
"c:\\foo\\bar",
S_OK, 0},
51 {
"file:c|/foo/bar",
"c:\\foo\\bar",
S_OK, 0},
52 {
"file:cx|/foo/bar",
"cx|\\foo\\bar",
S_OK, 0},
53 {
"file:c:foo/bar",
"c:foo\\bar",
S_OK, 0},
54 {
"file:c|foo/bar",
"c:foo\\bar",
S_OK, 0},
55 {
"file:c:/foo%20ba%2fr",
"c:\\foo ba/r",
S_OK, 0},
56 {
"file:foo%20ba%2fr",
"foo ba/r",
S_OK, 0},
57 {
"file:foo/bar/",
"foo\\bar\\",
S_OK, 0},
60 {
"file:/c:/foo/bar",
"c:\\foo\\bar",
S_OK, 0},
61 {
"file:\\c:/foo/bar",
"c:\\foo\\bar",
S_OK, 0},
62 {
"file:/c|/foo/bar",
"c:\\foo\\bar",
S_OK, 0},
63 {
"file:/cx|/foo/bar",
"\\cx|\\foo\\bar",
S_OK, 0},
64 {
"file:/c:foo/bar",
"c:foo\\bar",
S_OK, 0},
65 {
"file:/c|foo/bar",
"c:foo\\bar",
S_OK, 0},
66 {
"file:/c:/foo%20ba%2fr",
"c:\\foo ba/r",
S_OK, 0},
67 {
"file:/foo%20ba%2fr",
"\\foo ba/r",
S_OK, 0},
68 {
"file:/foo/bar/",
"\\foo\\bar\\",
S_OK, 0},
71 {
"file://c:/foo/bar",
"c:\\foo\\bar",
S_OK, 0},
72 {
"file://c:/d:/foo/bar",
"c:\\d:\\foo\\bar",
S_OK, 0},
73 {
"file://c|/d|/foo/bar",
"c:\\d|\\foo\\bar",
S_OK, 0},
74 {
"file://cx|/foo/bar",
"\\\\cx|\\foo\\bar",
S_OK, 0},
75 {
"file://c:foo/bar",
"c:foo\\bar",
S_OK, 0},
76 {
"file://c|foo/bar",
"c:foo\\bar",
S_OK, 0},
77 {
"file://c:/foo%20ba%2fr",
"c:\\foo%20ba%2fr",
S_OK, 0},
78 {
"file://c%3a/foo/../bar",
"\\\\c:\\foo\\..\\bar",
S_OK, 0},
79 {
"file://c%7c/foo/../bar",
"\\\\c|\\foo\\..\\bar",
S_OK, 0},
80 {
"file://foo%20ba%2fr",
"\\\\foo ba/r",
S_OK, 0},
81 {
"file://localhost/c:/foo/bar",
"c:\\foo\\bar",
S_OK, 0},
82 {
"file://localhost/c:/foo%20ba%5Cr",
"c:\\foo ba\\r",
S_OK, 0},
83 {
"file://LocalHost/c:/foo/bar",
"c:\\foo\\bar",
S_OK, 0},
84 {
"file:\\\\localhost\\c:\\foo\\bar",
"c:\\foo\\bar",
S_OK, 0},
85 {
"file://incomplete",
"\\\\incomplete",
S_OK, 0},
88 {
"file:///c:/foo/bar",
"c:\\foo\\bar",
S_OK, 0},
89 {
"File:///c:/foo/bar",
"c:\\foo\\bar",
S_OK, 0},
90 {
"file:///c:/foo%20ba%2fr",
"c:\\foo ba/r",
S_OK, 0},
91 {
"file:///foo%20ba%2fr",
"\\foo ba/r",
S_OK, 0},
92 {
"file:///foo/bar/",
"\\foo\\bar\\",
S_OK, 0},
93 {
"file:///localhost/c:/foo/bar",
"\\localhost\\c:\\foo\\bar",
S_OK, 0},
96 {
"file:////c:/foo/bar",
"c:\\foo\\bar",
S_OK, 0},
97 {
"file:////c:/foo%20ba%2fr",
"c:\\foo%20ba%2fr",
S_OK, 0},
98 {
"file:////foo%20ba%2fr",
"\\\\foo%20ba%2fr",
S_OK, 0},
101 {
"file://///c:/foo/bar",
"\\\\c:\\foo\\bar",
S_OK, 0},
102 {
"file://///c:/foo%20ba%2fr",
"\\\\c:\\foo ba/r",
S_OK, 0},
103 {
"file://///foo%20ba%2fr",
"\\\\foo ba/r",
S_OK, 0},
104 {
"file://////c:/foo/bar",
"\\\\c:\\foo\\bar",
S_OK, 0},
107 {
"file:%2f%2flocalhost%2fc:/foo/bar",
"//localhost/c:\\foo\\bar",
S_OK, 0},
108 {
"file:%5C%5Clocalhost%5Cc:/foo/bar",
"\\\\localhost\\c:\\foo\\bar",
S_OK, 0},
111 {
"file://l%6fcalhost/c:/foo/bar",
"\\\\localhostc:\\foo\\bar",
S_OK, 0},
112 {
"file://localhost:80/c:/foo/bar",
"\\\\localhost:80c:\\foo\\bar",
S_OK, 0},
113 {
"file://host/c:/foo/bar",
"\\\\hostc:\\foo\\bar",
S_OK, 0},
114 {
"file://host//c:/foo/bar",
"\\\\host\\\\c:\\foo\\bar",
S_OK, 0},
115 {
"file://host/\\c:/foo/bar",
"\\\\host\\\\c:\\foo\\bar",
S_OK, 0},
116 {
"file://host/c:foo/bar",
"\\\\hostc:foo\\bar",
S_OK, 0},
117 {
"file://host/foo/bar",
"\\\\host\\foo\\bar",
S_OK, 0},
118 {
"file:\\\\host\\c:\\foo\\bar",
"\\\\hostc:\\foo\\bar",
S_OK, 0},
119 {
"file:\\\\host\\ca\\foo\\bar",
"\\\\host\\ca\\foo\\bar",
S_OK, 0},
120 {
"file:\\\\host\\c|\\foo\\bar",
"\\\\hostc|\\foo\\bar",
S_OK, 0},
121 {
"file:\\%5Chost\\c:\\foo\\bar",
"\\\\host\\c:\\foo\\bar",
S_OK, 0},
122 {
"file:\\\\host\\cx:\\foo\\bar",
"\\\\host\\cx:\\foo\\bar",
S_OK, 0},
123 {
"file:///host/c:/foo/bar",
"\\host\\c:\\foo\\bar",
S_OK, 0},
137 {
"http://foo/bar",
TRUE},
138 {
"c:\\foo\\bar",
FALSE},
139 {
"c:/foo/bar",
FALSE},
140 {
"foo://foo/bar",
TRUE},
143 {
"bogusscheme:",
TRUE},
144 {
"http:partial",
TRUE},
145 {
"www.winehq.org",
FALSE},
147 {
"winehq.org",
FALSE},
148 {
"ftp.winehq.org",
FALSE},
149 {
"http://winehq.org",
TRUE},
150 {
"http://www.winehq.org",
TRUE},
151 {
"https://winehq.org",
TRUE},
152 {
"https://www.winehq.org",
TRUE},
153 {
"ftp://winehq.org",
TRUE},
154 {
"ftp://ftp.winehq.org",
TRUE},
155 {
"file://does_not_exist.txt",
TRUE},
156 {
"about:blank",
TRUE},
157 {
"about:home",
TRUE},
158 {
"about:mozilla",
TRUE},
160 {
"HTTP://www.winehq.org",
TRUE},
162 {
" http://www.winehq.org",
FALSE},
171 {
"abcdef",
"abcdef" },
172 {
"\"abcdef\"",
"abcdef" },
173 {
"\"abcdef",
"\"abcdef" },
174 {
"abcdef\"",
"abcdef\"" },
175 {
"\"\"abcdef\"\"",
"\"abcdef\"" },
176 {
"abc\"def",
"abc\"def" },
177 {
"\"abc\"def",
"\"abc\"def" },
178 {
"\"abc\"def\"",
"abc\"def" },
179 {
"\'abcdef\'",
"\'abcdef\'" },
205 WCHAR expect1[] = {
'c',
':',
'\\',
'f',
'o',
'o',0};
207 WCHAR c_drive[] = {
'c',
':',0};
210 WCHAR winini[] = {
'w',
'i',
'n',
'.',
'i',
'n',
'i',0};
213 WCHAR dot[] = {
'.',0};
217 "PathSearchAndQualify rets 0\n");
222 "PathSearchAndQualify rets 0\n");
230 "PathSearchAndQualify rets 0\n");
238 "PathSearchAndQualify rets 0\n");
245 "PathSearchAndQualify rets 0\n");
260 if (!pPathCreateFromUrlA) {
261 win_skip(
"PathCreateFromUrlA not found\n");
267 ret = pPathCreateFromUrlA(
"file://foo",
NULL, &
len, 0);
269 ok(
len == 0xdeca,
"got %lx expected 0xdeca\n",
len);
286 if (pPathCreateFromUrlW) {
290 ret = pPathCreateFromUrlW(urlW, ret_pathW, &
len, 0);
296 ok(!
lstrcmpiW(ret_pathW, pathW),
"got %s expected %s from url L\"%s\"\n",
301 ok(!
lstrcmpiW(ret_pathW, pathW),
"got %s expected %s from url L\"%s\"\n",
309 ret = pPathCreateFromUrlW(urlW, ret_pathW, &len2, 0);
320 if (pPathCreateFromUrlAlloc)
322 static const WCHAR fileW[] = {
'f',
'i',
'l',
'e',
':',
'/',
'/',
'f',
'o',
'o',0};
323 static const WCHAR fooW[] = {
'\\',
'\\',
'f',
'o',
'o',0};
326 ret = pPathCreateFromUrlAlloc(
fileW, &pathW, 0);
349 0x00000000, 0x00000000, 0x00000000, 0x00000000,
350 0x00000000, 0x00000000, 0x00000000, 0x00000000,
351 0x00000000, 0x00000000, 0x00000000, 0x00000000,
352 0x00000000, 0x00000000, 0x00000000, 0x00000000,
353 0x00000000, 0x00000000, 0x00000000, 0x00000000,
354 0x00000000, 0x00000000, 0x00000000, 0x00000000,
355 0x00000000, 0x00000000, 0x00000000, 0x00000000,
356 0x00000000, 0x00000000, 0x00000000, 0x00000000,
357 0x00000080, 0x00000100, 0x00000200, 0x00000100,
358 0x00000100, 0x00000100, 0x00000100, 0x00000100,
359 0x00000100, 0x00000100, 0x00000002, 0x00000100,
360 0x00000040, 0x00000100, 0x00000004, 0x00000000,
361 0x00000100, 0x00000100, 0x00000100, 0x00000100,
362 0x00000100, 0x00000100, 0x00000100, 0x00000100,
363 0x00000100, 0x00000100, 0x00000010, 0x00000020,
364 0x00000000, 0x00000100, 0x00000000, 0x00000001,
365 0x00000100, 0xffffffff, 0xffffffff, 0xffffffff,
366 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
367 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
368 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
369 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
370 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
371 0xffffffff, 0xffffffff, 0xffffffff, 0x00000100,
372 0x00000008, 0x00000100, 0x00000100, 0x00000100,
373 0x00000100, 0xffffffff, 0xffffffff, 0xffffffff,
374 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
375 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
376 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
377 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
378 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
379 0xffffffff, 0xffffffff, 0xffffffff, 0x00000100,
380 0x00000000, 0x00000100, 0x00000100
391 if (!pPathIsValidCharA || pPathIsValidCharA == (
void*)pPathAppendA)
393 win_skip(
"PathIsValidCharA isn't available\n");
397 for (
c = 0;
c < 0x7f;
c++)
399 ret = pPathIsValidCharA(
c, ~0
U );
403 for (
c = 0x7f;
c <= 0xff;
c++)
405 ret = pPathIsValidCharA(
c, ~0
U );
406 ok (
ret,
"PathIsValidCharA failed: 0x%02x got 0x%08x\n",
c,
ret );
415 if (!pPathIsValidCharW)
417 win_skip(
"PathIsValidCharW isn't available\n");
421 for (
c = 0;
c < 0x7f;
c++)
423 ret = pPathIsValidCharW(
c, ~0
U );
427 for (
c = 0x007f;
c <= 0xffff;
c++)
429 ret = pPathIsValidCharW(
c, ~0
U );
430 ok (
ret,
"PathIsValidCharW failed: 0x%02x got 0x%08x\n",
c,
ret );
442 strcpy(
buff,
"C:\\A LONG FILE NAME WITH \\SPACES.TXT");
444 ok (
strcmp(
buff,
"C:\\a long file name with \\spaces.txt") == 0,
445 "PathMakePretty: Long UC name not changed\n");
447 strcpy(
buff,
"C:\\A LONG FILE NAME WITH \\MixedCase.TXT");
449 ok (
strcmp(
buff,
"C:\\A LONG FILE NAME WITH \\MixedCase.TXT") == 0,
450 "PathMakePretty: Failed but modified path\n");
454 ok (
strcmp(
buff,
"Test") == 0,
"PathMakePretty: 1st char lowercased %s\n",
buff);
459 static const char file[] =
"c:\\foo\\bar\\filename.ext";
460 static const char spec1[] =
".ext";
461 static const char spec2[] =
"*.ext";
462 static const char spec3[] =
"*.ext ";
463 static const char spec4[] =
" *.ext";
464 static const char spec5[] =
"* .ext";
465 static const char spec6[] =
"*. ext";
466 static const char spec7[] =
"* . ext";
467 static const char spec8[] =
"*.e?t";
468 static const char spec9[] =
"filename.ext";
469 static const char spec10[] =
"*bar\\filename.ext";
470 static const char spec11[] =
" foo; *.ext";
471 static const char spec12[] =
"*.ext;*.bar";
472 static const char spec13[] =
"*bar*";
491 LPWSTR wszString, wszString2;
493 static const WCHAR expout[] = {
'C',
':',
'\\',
'A',
'A',0};
498 win_skip(
"PathCombineW isn't available\n");
506 ok (wszString ==
NULL,
"Expected a NULL return\n");
510 wszString = pPathCombineW(wszString2,
NULL,
NULL);
512 broken(wszString[0] ==
'a'),
513 "Expected a NULL return\n");
514 ok (wszString2[0] == 0 ||
515 broken(wszString2[0] ==
'a'),
516 "Destination string not empty\n");
521 wstr2[0] = wstr2[1] = wstr2[2] =
'A';
523 wstr1[
i] = wstr2[
i] =
'A';
525 memset(wbuf, 0xbf,
sizeof(wbuf));
527 wszString = pPathCombineW(wbuf, wstr1, wstr2);
528 ok(wszString ==
NULL,
"Expected a NULL return\n");
530 broken(wbuf[0] == 0xbfbf),
531 "Buffer contains data\n");
536 ok(
PathCombineW(wstr1, wstr1, wstr2) == wstr1,
"Expected a wstr1 return\n");
537 ok(
StrCmpW(wstr1, expout) == 0,
"Unexpected PathCombine output\n");
541#define LONG_LEN (MAX_PATH * 2)
542#define HALF_LEN (MAX_PATH / 2 + 1)
592 "Expected \\, got %s\n",
str);
600 ok(!
lstrcmpA(
str,
"one\\two\\three"),
"Expected one\\two\\three, got %s\n",
str);
610 "Expected \\, got %s\n",
str);
621 "Expected str == NULL, got %p\n",
str);
631 ok(!
lstrcmpA(
str,
"C:\\one\\two\\three"),
"Expected C:\\one\\two\\three, got %s\n",
str);
639 ok(!
lstrcmpA(
str,
"C:\\one\\two\\three"),
"Expected C:\\one\\two\\three, got %s\n",
str);
647 ok(!
lstrcmpA(
str,
"C:\\one\\two\\three"),
"Expected C:\\one\\two\\three, got %s\n",
str);
655 ok(!
lstrcmpA(
str,
"C:\\one\\two\\three\\"),
"Expected C:\\one\\two\\three\\, got %s\n",
str);
667 ok(!
lstrcmpA(
str,
"one\\two\\three\\"),
"Expected one\\two\\three\\, got %s\n",
str);
675 ok(!
lstrcmpA(
str,
"C:\\one/two/three\\"),
"Expected one/two/three\\, got %s\n",
str);
683 ok(!
lstrcmpA(
str,
"C:\\one\\two\\three\\"),
"Expected C:\\one\\two\\three\\, got %s\n",
str);
691 ok(!
lstrcmpA(
str,
"C:\\two\\three"),
"Expected C:\\two\\three, got %s\n",
str);
709 ok(!
lstrcmpA(
str,
"../../../one/two/\\*"),
"Expected ../../../one/two/\\*, got %s\n",
str);
822 ok(!
res,
"Expected failure\n");
829 ok(
res,
"Expected success\n");
836 ok(!
res,
"Expected failure\n");
843 ok(
res,
"Expected success\n");
851 ok(
res,
"Expected success\n");
859 ok(
res,
"Expected success\n");
861 ok(!
lstrcmpA(
path,
"C:\\one\\two\\three"),
"Expected C:\\one\\two\\three, got %s\n",
path);
867 ok(
res,
"Expected success\n");
869 ok(!
lstrcmpA(
path,
"C:\\one\\two\\three"),
"Expected C:\\one\\two\\three, got %s\n",
path);
875 ok(
res,
"Expected success\n");
877 ok(!
lstrcmpA(
path,
"C:\\one\\two\\three"),
"Expected C:\\one\\two\\three, got %s\n",
path);
883 ok(
res,
"Expected success\n");
885 ok(!
lstrcmpA(
path,
"C:\\one\\two\\three\\"),
"Expected C:\\one\\two\\three\\, got %s\n",
path);
891 ok(
res,
"Expected success\n");
893 ok(!
lstrcmpA(
path,
"C: \\ one \\two\\three"),
"Expected C: \\ one \\two\\three, got %s\n",
path);
899 ok(
res,
"Expected success\n");
901 ok(!
lstrcmpA(
path,
"C:\\one\\ two \\ three "),
"Expected 'C:\\one\\ two \\ three ', got %s\n",
path);
908 ok(!
res,
"Expected failure\n");
911 "Expected length of too_long to be zero, got %i\n",
lstrlenA(too_long));
919 ok(!
res,
"Expected failure\n");
922 "Expected length of path to be zero, got %i\n",
lstrlenA(
path));
931 ok(!
res,
"Expected failure\n");
933 "Expected length of path to be zero, got %i\n",
lstrlenA(
path));
947 ok(!
res,
"Expected failure\n");
949 "Expected ERROR_INVALID_PARAMETER, got %ld\n",
GetLastError());
951 "Expected either an empty string (Vista) or test, got %s\n",
dest);
957 ok(
res,
"Expected success\n");
961 "Expected \\, got %s\n",
dest);
966 ok(!
res,
"Expected failure\n");
968 "Expected ERROR_INVALID_PARAMETER, got %ld\n",
GetLastError());
974 ok(
res,
"Expected success\n");
982 ok(
res,
"Expected success\n");
990 ok(
res,
"Expected success\n");
998 ok(
res,
"Expected success\n");
1006 ok(
res,
"Expected success\n");
1014 ok(
res,
"Expected success\n");
1017 "Expected C:\\one/two/three\\four/five\\six, got %s\n",
dest);
1023 ok(
res,
"Expected success\n");
1031 ok(
res,
"Expected success\n");
1035 "Expected \"C:\\one/.\" or \"C:\\one/\", got \"%s\"\n",
dest);
1041 ok(
res,
"Expected success\n");
1049 ok(
res,
"Expected success\n");
1051 ok(!
lstrcmpA(
dest,
"../../one/two/\\*"),
"Expected ../../one/two/\\*, got %s\n",
dest);
1060 ok(
res,
"Expected success\n");
1072 "Expected failure\n");
1076 "Expected 0xdeadbeef or ERROR_FILENAME_EXCED_RANGE, got %ld\n",
GetLastError());
1097 ok(
ext ==
path,
"Expected ext == path, got %p\n",
ext);
1114 "Expected ext == path + lstrlenA(\"file\"), got %p\n",
ext);
1123 "Expected ext == path + lstrlenA(\"file.txt\"), got %p\n",
ext);
1132 ok(
ext == too_long +
LONG_LEN - 1,
"Expected ext == too_long + LONG_LEN - 1, got %p\n",
ext);
1138 lstrcpyA(too_long + 300,
".abcde");
1139 too_long[
lstrlenA(too_long)] =
'a';
1142 ok(
ext == too_long + 300,
"Expected ext == too_long + 300, got %p\n",
ext);
1151 char root_expected[26][4];
1160 for (
j = 0;
j < 26;
j++)
1176 "Expected aaaaaaaaa or empty string, got %s\n",
path);
1185 "Expected aaaaaaaaa or empty string, got %s\n",
path);
1398 ok(!
lstrcmpA(
out,
"one\\mid.end"),
"Expected one\\mid.end, got %s\n",
out);
1429 ok(!
lstrcmpW(pathW, resultW),
"%s (W): strings differ\n",
1439 static const CHAR test1A[] =
"a:\\test.file";
1440 static const CHAR test2A[] =
"file:////b:\\test.file";
1441 static const CHAR test3A[] =
"file:///c:\\test.file";
1442 static const CHAR test4A[] =
"file:\\\\c:\\test.file";
1443 static const CHAR test5A[] =
"\\\\?\\C:\\dir\\file.txt";
1444 static const WCHAR test1W[] =
1446 static const WCHAR test5W[] =
1447 {
'\\',
'\\',
'?',
'\\',
'C',
':',
'\\',
'd',
'i',
'r',
'\\',
'f',
'i',
'l',
'e',0};
1474 static const WCHAR sysrootW[] = {
'%',
'S',
'y',
's',
't',
'e',
'm',
'R',
'o',
'o',
't',
'%',0};
1475 static const WCHAR sysdriveW[] = {
'%',
'S',
'y',
's',
't',
'e',
'm',
'D',
'r',
'i',
'v',
'e',
'%',0};
1476 static const WCHAR nonpathW[] = {
'p',
'a',
't',
'h',0};
1477 static const WCHAR computernameW[] = {
'C',
'O',
'M',
'P',
'U',
'T',
'E',
'R',
'N',
'A',
'M',
'E',0};
1478 static const char sysrootA[] =
"%SystemRoot%";
1479 static const char sysdriveA[] =
"%SystemDrive%";
1485 if (!pPathUnExpandEnvStringsA || !pPathUnExpandEnvStringsW)
1487 win_skip(
"PathUnExpandEnvStrings not available\n");
1495 ret = pPathUnExpandEnvStringsA(envvarA,
buff,
sizeof(
buff));
1501 ret = pPathUnExpandEnvStringsW(envvarW, buffW,
ARRAY_SIZE(buffW));
1510 ok(
buff[0] ==
'x',
"wrong return string %s\n",
buff);
1513 ok(
len > 0,
"failed to get sysdir\n");
1515 sysdrvA[0] =
path[0];
1516 strcpy(&sysdrvA[1],
":");
1523 ok(
buff[0] ==
'x',
"wrong return string %s\n",
buff);
1528 ret = pPathUnExpandEnvStringsA(
path,
buff,
sizeof(sysrootA));
1530 ok(
buff[0] ==
'x',
"wrong return string %s\n",
buff);
1536 ok(!
strncmp(
buff, sysrootA,
sizeof(sysrootA)-1),
"wrong return string %s\n",
buff);
1571 buffW[0] =
'x'; buffW[1] = 0;
1573 ret = pPathUnExpandEnvStringsW(pathW, buffW,
ARRAY_SIZE(buffW));
1575 ok(buffW[0] ==
'x',
"wrong return string %s\n",
wine_dbgstr_w(buffW));
1578 ok(
len > 0,
"failed to get sysdir\n");
1580 sysdrvW[0] = pathW[0];
1585 buffW[0] =
'x'; buffW[1] = 0;
1587 ret = pPathUnExpandEnvStringsW(pathW, buffW, 5);
1589 ok(buffW[0] ==
'x',
"wrong return string %s\n",
wine_dbgstr_w(buffW));
1592 buffW[0] =
'x'; buffW[1] = 0;
1594 ret = pPathUnExpandEnvStringsW(pathW, buffW,
ARRAY_SIZE(sysrootW));
1596 ok(buffW[0] ==
'x',
"wrong return string %s\n",
wine_dbgstr_w(buffW));
1600 ret = pPathUnExpandEnvStringsW(pathW, buffW,
ARRAY_SIZE(buffW));
1609 ret = pPathUnExpandEnvStringsW(pathW, buffW,
ARRAY_SIZE(buffW));
1617static const struct {
1624 {
"\\\\folder\\test.txt",
FALSE},
1625 {
"file://folder/test.txt",
TRUE},
1626 {
"C:\\test.txt",
FALSE},
1627 {
"file:///C:/test.txt",
TRUE}
1635 if (!pPathIsRelativeA) {
1636 win_skip(
"PathIsRelativeA not available\n");
1641 for (
i = 0;
i <
num;
i++) {
1644 "PathIsRelativeA(\"%s\") expects %d, got %d.\n",
1655 if (!pPathIsRelativeW) {
1656 win_skip(
"PathIsRelativeW not available\n");
1661 for (
i = 0;
i <
num;
i++) {
1666 "PathIsRelativeW(\"%s\") expects %d, got %d.\n",
1675 const char const_path[] =
"test";
1676 char path[] =
"short//path\\file.txt";
1688 static const struct {
1692 {
L"c:\\test\\a[123]",
L"c:\\test\\a" },
1693 {
L"c:\\test\\a[123].txt",
L"c:\\test\\a.txt" },
1694 {
L"c:\\test\\a.txt[123]",
L"c:\\test\\a.txt[123]" },
1695 {
L"c:\\test\\a[123a].txt",
L"c:\\test\\a[123a].txt" },
1696 {
L"c:\\test\\a[a123].txt",
L"c:\\test\\a[a123].txt" },
1697 {
L"c:\\test\\a[12\x0660].txt",
L"c:\\test\\a[12\x0660].txt" },
1698 {
L"c:\\test\\a[12]file",
L"c:\\test\\a[12]file" },
1699 {
L"c:\\test[123]\\a",
L"c:\\test[123]\\a" },
1700 {
L"c:\\test\\[123]",
L"c:\\test\\[123]" },
1701 {
L"a[123]",
L"a" },
1703 {
L"[123]",
L"[123]" }
1728 struct remove_blanks_test {
1732 struct remove_blanks_test
tests[] = {
1741 {
" test ",
"test"}};
1745 const UINT CP_ASCII = 20127;
1776 win_skip(
"Too old shlwapi version\n");
int strcmp(const char *String1, const char *String2)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
ACPI_SIZE strlen(const char *String)
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
#define ERROR_INVALID_PARAMETER
#define GetEnvironmentVariableW(x, y, z)
#define GetProcAddress(x, y)
#define WideCharToMultiByte
#define GetEnvironmentVariableA(x, y, z)
#define MultiByteToWideChar
static const WCHAR *const ext[]
BOOL WINAPI DECLSPEC_HOTPATCH SetEnvironmentVariableA(IN LPCSTR lpName, IN LPCSTR lpValue)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
DWORD WINAPI SearchPathW(IN LPCWSTR lpPath OPTIONAL, IN LPCWSTR lpFileName, IN LPCWSTR lpExtension OPTIONAL, IN DWORD nBufferLength, OUT LPWSTR lpBuffer, OUT LPWSTR *lpFilePart OPTIONAL)
UINT WINAPI GetSystemDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
DWORD WINAPI GetFullPathNameW(IN LPCWSTR lpFileName, IN DWORD nBufferLength, OUT LPWSTR lpBuffer, OUT LPWSTR *lpFilePart)
UINT WINAPI GetSystemDirectoryA(OUT LPSTR lpBuffer, IN UINT uSize)
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)
BOOL WINAPI PathMatchSpecA(const char *path, const char *mask)
void WINAPI PathRemoveBlanksW(WCHAR *path)
LPSTR WINAPI PathFindExtensionA(const char *path)
int WINAPI PathCommonPrefixA(const char *file1, const char *file2, char *path)
void WINAPI PathRemoveBlanksA(char *path)
void WINAPI PathUnquoteSpacesW(WCHAR *path)
int WINAPI PathGetDriveNumberW(const WCHAR *path)
void WINAPI PathStripPathA(char *path)
int WINAPI PathGetDriveNumberA(const char *path)
void WINAPI PathUnquoteSpacesA(char *path)
BOOL WINAPI PathSearchAndQualifyW(const WCHAR *path, WCHAR *buffer, UINT length)
BOOL WINAPI PathIsURLA(const char *path)
int WINAPI StrCmpW(const WCHAR *str, const WCHAR *comp)
LPSTR WINAPI PathBuildRootA(LPSTR lpszPath, int drive)
static const DWORD SHELL_charclass[]
void WINAPI PathUndecorateW(LPWSTR pszPath)
BOOL WINAPI PathMakePrettyA(LPSTR lpszPath)
void WINAPI PathUndecorateA(LPSTR pszPath)
static const WCHAR fileW[]
#define INTERNET_MAX_URL_LENGTH
static unsigned char buff[32768]
GLuint GLuint GLsizei count
GLenum GLuint GLenum GLsizei const GLchar * buf
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
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 GLint GLint j
HLOCAL NTAPI LocalFree(HLOCAL hMem)
#define MB_ERR_INVALID_CHARS
#define WC_NO_BEST_FIT_CHARS
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
int WINAPI lstrlenA(LPCSTR lpString)
#define todo_wine_if(is_todo)
static struct test_info tests[]
#define expect(expected, got)
static const WCHAR fooW[]
static LPSTR *static LPCWSTR
static void test_PathUndecorate(void)
static const struct @1838 TEST_PATH_UNQUOTE_SPACES[]
static void test_PathGetDriveNumber(void)
static void test_PathAppendA(void)
static struct @1837 TEST_PATH_IS_URL[]
static void test_PathCommonPrefixA(void)
static const struct @1839 test_path_is_relative[]
static void test_PathStripPathA(void)
static LPWSTR GetWideString(const char *src)
static void test_PathUnExpandEnvStrings(void)
static void test_PathUnquoteSpaces(void)
static void test_PathRemoveBlanks(void)
static void test_PathFindExtensionA(void)
static void test_PathCreateFromUrl(void)
static void test_PathSearchAndQualify(void)
static void test_PathBuildRootA(void)
static void test_PathCombineW(void)
static void test_PathIsRelativeW(void)
static void test_PathMatchSpec(void)
static void test_PathIsRelativeA(void)
static void test_PathAddBackslash(void)
static void test_PathIsValidCharA(void)
static void test_PathCombineA(void)
static void test_PathMakePretty(void)
static void test_PathIsValidCharW(void)
static const struct @1836 TEST_PATHFROMURL[]
static void test_PathCanonicalizeA(void)
static void test_PathIsUrl(void)
static const WCHAR path3[]
static const WCHAR path1[]
static const WCHAR path2[]
#define PathCanonicalizeA
#define PathAddBackslashA
#define PathAddBackslashW
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
_Check_return_ _CRTIMP char *__cdecl strdup(_In_opt_z_ const char *_Src)
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
DWORD WINAPI GetLastError(void)
#define ERROR_FILENAME_EXCED_RANGE