35#define STD_HEADER "[Version]\r\nSignature=\"$CHICAGO$\"\r\n"
39 static char string[17];
40 if (
sizeof(
ll) >
sizeof(
unsigned long) &&
ll >> 32)
41 sprintf(
string,
"%lx%08lx", (
unsigned long)(
ll >> 32), (
unsigned long)
ll);
43 sprintf(
string,
"%lx", (
unsigned long)
ll);
65 "Expected SetupCreateDiskSpaceListA to return a valid handle, got NULL\n");
71 "Expected SetupCreateDiskSpaceListA to return a valid handle, got NULL\n");
79 "Expected SetupCreateDiskSpaceListA to return NULL, got %p\n",
ret);
82 "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
90 "Expected SetupCreateDiskSpaceListA to return NULL, got %p\n",
ret);
93 "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
99 "Expected SetupCreateDiskSpaceListA to return NULL, got %p\n",
ret);
102 "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
108 "Expected SetupCreateDiskSpaceListA to return NULL, got %p\n",
ret);
111 "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
122 win_skip(
"SetupCreateDiskSpaceListW is not implemented\n");
126 "Expected SetupCreateDiskSpaceListW to return a valid handle, got NULL\n");
132 "Expected SetupCreateDiskSpaceListW to return a valid handle, got NULL\n");
140 "Expected SetupCreateDiskSpaceListW to return NULL, got %p\n",
ret);
143 "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
151 "Expected SetupCreateDiskSpaceListW to return NULL, got %p\n",
ret);
154 "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
160 "Expected SetupCreateDiskSpaceListW to return NULL, got %p\n",
ret);
163 "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
169 "Expected SetupCreateDiskSpaceListW to return NULL, got %p\n",
ret);
172 "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
181 win_skip(
"SetupDuplicateDiskSpaceListA crashes with NULL disk space handle on Win9x\n");
186 ok(!duplicate,
"Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate);
188 "Expected GetLastError() to return ERROR_INVALID_HANDLE, got %u\n",
GetLastError());
192 ok(!duplicate,
"Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate);
194 "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
GetLastError());
198 ok(!duplicate,
"Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate);
200 "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
GetLastError());
204 ok(!duplicate,
"Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate);
206 "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
GetLastError());
211 "Expected SetupCreateDiskSpaceListA to return a valid handle, got NULL\n");
215 skip(
"Failed to create a disk space handle\n");
221 ok(!duplicate,
"Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate);
223 "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
GetLastError());
227 ok(!duplicate,
"Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate);
229 "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
GetLastError());
233 ok(!duplicate,
"Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate);
235 "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
GetLastError());
239 ok(!duplicate,
"Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate);
241 "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
GetLastError());
244 ok(duplicate !=
NULL,
"Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate);
246 "Expected new handle (%p) to be different from the old handle (%p)\n", duplicate,
handle);
260 win_skip(
"SetupDuplicateDiskSpaceListW is not available\n");
263 ok(!duplicate,
"Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate);
265 "Expected GetLastError() to return ERROR_INVALID_HANDLE, got %u\n",
GetLastError());
269 ok(!duplicate,
"Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate);
271 "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
GetLastError());
275 ok(!duplicate,
"Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate);
277 "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
GetLastError());
281 ok(!duplicate,
"Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate);
283 "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
GetLastError());
287 "Expected SetupCreateDiskSpaceListW to return a valid handle, got NULL\n");
291 skip(
"Failed to create a disk space handle\n");
297 ok(!duplicate,
"Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate);
299 "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
GetLastError());
303 ok(!duplicate,
"Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate);
305 "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
GetLastError());
309 ok(!duplicate,
"Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate);
311 "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
GetLastError());
315 ok(!duplicate,
"Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate);
317 "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
GetLastError());
320 ok(duplicate !=
NULL,
"Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate);
322 "Expected new handle (%p) to be different from the old handle (%p)\n", duplicate,
handle);
341 return size.QuadPart;
355 win_skip(
"SetupQuerySpaceRequiredOnDriveA crashes with NULL disk space handle on Win9x\n");
360 ok(!
ret,
"Expected SetupQuerySpaceRequiredOnDriveA to return FALSE, got %d\n",
ret);
362 "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
368 ok(!
ret,
"Expected SetupQuerySpaceRequiredOnDriveA to return FALSE, got %d\n",
ret);
369 ok(
space == 0xdeadbeef,
"Expected output space parameter to be untouched\n");
371 "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
376 ok(!
ret,
"Expected SetupQuerySpaceRequiredOnDriveA to return FALSE, got %d\n",
ret);
378 "Expected GetLastError() to return ERROR_INVALID_HANDLE, got %u\n",
384 ok(!
ret,
"Expected SetupQuerySpaceRequiredOnDriveA to return FALSE, got %d\n",
ret);
385 ok(
space == 0xdeadbeef,
"Expected output space parameter to be untouched\n");
387 "Expected GetLastError() to return ERROR_INVALID_HANDLE, got %u\n",
393 "Expected SetupCreateDiskSpaceListA to return a valid handle, got NULL\n");
397 ok(!
ret,
"Expected SetupQuerySpaceRequiredOnDriveA to return FALSE, got %d\n",
ret);
400 "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
406 ok(!
ret,
"Expected SetupQuerySpaceRequiredOnDriveA to return FALSE, got %d\n",
ret);
407 ok(
space == 0xdeadbeef,
"Expected output space parameter to be untouched\n");
410 "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
415 ok(!
ret,
"Expected SetupQuerySpaceRequiredOnDriveA to return FALSE, got %d\n",
ret);
417 "Expected GetLastError() to return ERROR_INVALID_DRIVE, got %u\n",
423 ok(!
ret,
"Expected SetupQuerySpaceRequiredOnDriveA to return FALSE, got %d\n",
ret);
424 ok(
space == 0xdeadbeef,
"Expected output space parameter to be untouched\n");
426 "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
434 ok(
ret,
"Expected SetupAddToDiskSpaceListA to succeed\n");
438 ok(
ret,
"Expected SetupQuerySpaceRequiredOnDriveA to succeed\n");
443 ok(
ret,
"Expected SetupAddToDiskSpaceListA to succeed\n");
447 ok(
ret,
"Expected SetupQuerySpaceRequiredOnDriveA to succeed\n");
453 ok(
ret,
"Expected SetupAddToDiskSpaceListA to succeed\n");
456 ok(
ret,
"Expected SetupQuerySpaceRequiredOnDriveA to succeed\n");
461 ok(
ret,
"Expected SetupAddToDiskSpaceListA to succeed\n");
464 ok(
ret,
"Expected SetupQuerySpaceRequiredOnDriveA to succeed\n");
468 "Expected SetupDestroyDiskSpaceList to succeed\n");
472 "Expected SetupCreateDiskSpaceListA to return a valid handle, got NULL\n");
479 ok(
ret,
"Expected SetupAddToDiskSpaceListA to succeed\n");
482 ok(
ret,
"Expected SetupQuerySpaceRequiredOnDriveA to succeed\n");
487 ok(
ret,
"Expected SetupAddToDiskSpaceListA to succeed\n");
489 ok(
ret,
"Expected SetupQuerySpaceRequiredOnDriveA to succeed\n");
494 ok(
ret,
"Expected SetupAddToDiskSpaceListA to succeed\n");
496 ok(
ret,
"Expected SetupQuerySpaceRequiredOnDriveA to succeed\n");
501 "Expected SetupDestroyDiskSpaceList to succeed\n");
506 "Expected SetupCreateDiskSpaceListA to return a valid handle, got NULL\n");
509 ok(
ret,
"Expected SetupAddToDiskSpaceListA to succeed\n");
511 ok(
ret,
"Expected SetupAddToDiskSpaceListA to succeed\n");
515 ok(
ret,
"Expected SetupQuerySpaceRequiredOnDriveA to succeed\n");
520 "Expected SetupDestroyDiskSpaceList to succeed\n");
525 "Expected SetupCreateDiskSpaceListA to return a valid handle, got NULL\n");
528 ok(
ret,
"Expected SetupAddToDiskSpaceListA to succeed\n");
530 ok(
ret,
"Expected SetupAddToDiskSpaceListA to succeed\n");
534 ok(
ret,
"Expected SetupQuerySpaceRequiredOnDriveA to succeed\n");
539 "Expected SetupDestroyDiskSpaceList to succeed\n");
544 "Expected SetupCreateDiskSpaceListA to return a valid handle, got NULL\n");
547 ok(
ret,
"Expected SetupAddToDiskSpaceListA to succeed\n");
550 ok(
ret,
"Expected SetupQuerySpaceRequiredOnDriveA to succeed\n");
554 "Expected SetupDestroyDiskSpaceList to succeed\n");
559 "Expected SetupCreateDiskSpaceListA to return a valid handle, got NULL\n");
562 ok(
ret,
"Expected SetupAddToDiskSpaceListA to succeed\n");
565 ok(
ret,
"Expected SetupQuerySpaceRequiredOnDriveA to succeed\n");
569 ok(
ret,
"Expected SetupAddToDiskSpaceListA to succeed\n");
571 ok(
ret,
"Expected SetupAddToDiskSpaceListA to succeed\n");
575 ok(
ret,
"Expected SetupQuerySpaceRequiredOnDriveA to succeed\n");
579 "Expected SetupDestroyDiskSpaceList to succeed\n");
594 win_skip(
"SetupQuerySpaceRequiredOnDriveW is not available\n");
597 ok(!
ret,
"Expected SetupQuerySpaceRequiredOnDriveW to return FALSE, got %d\n",
ret);
599 "Expected GetLastError() to return ERROR_INVALID_HANDLE, got %u\n",
605 ok(!
ret,
"Expected SetupQuerySpaceRequiredOnDriveW to return FALSE, got %d\n",
ret);
606 ok(
space == 0xdeadbeef,
"Expected output space parameter to be untouched\n");
608 "Expected GetLastError() to return ERROR_INVALID_HANDLE, got %u\n",
613 ok(!
ret,
"Expected SetupQuerySpaceRequiredOnDriveW to return FALSE, got %d\n",
ret);
615 "Expected GetLastError() to return ERROR_INVALID_HANDLE, got %u\n",
621 ok(!
ret,
"Expected SetupQuerySpaceRequiredOnDriveW to return FALSE, got %d\n",
ret);
622 ok(
space == 0xdeadbeef,
"Expected output space parameter to be untouched\n");
624 "Expected GetLastError() to return ERROR_INVALID_HANDLE, got %u\n",
629 "Expected SetupCreateDiskSpaceListA to return a valid handle, got NULL\n");
633 ok(!
ret,
"Expected SetupQuerySpaceRequiredOnDriveW to return FALSE, got %d\n",
ret);
636 "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
642 ok(!
ret,
"Expected SetupQuerySpaceRequiredOnDriveW to return FALSE, got %d\n",
ret);
643 ok(
space == 0xdeadbeef,
"Expected output space parameter to be untouched\n");
646 "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
651 ok(!
ret,
"Expected SetupQuerySpaceRequiredOnDriveW to return FALSE, got %d\n",
ret);
653 "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
659 ok(!
ret,
"Expected SetupQuerySpaceRequiredOnDriveW to return FALSE, got %d\n",
ret);
660 ok(
space == 0xdeadbeef,
"Expected output space parameter to be untouched\n");
662 "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
666 "Expected SetupDestroyDiskSpaceList to succeed\n");
675 ok(!
ret,
"Expected SetupAddToDiskSpaceListA to return FALSE, got %d\n",
ret);
677 "Expected GetLastError() to return ERROR_INVALID_HANDLE, got %u\n",
GetLastError());
680 ok(
handle !=
NULL,
"Expected SetupCreateDiskSpaceListA to return a valid handle\n");
683 ok(
ret ||
broken(!
ret) ,
"Expected SetupAddToDiskSpaceListA to succeed\n");
686 ok(
ret,
"Expected SetupAddToDiskSpaceListA to succeed\n");
689 ok(!
ret,
"Expected SetupAddToDiskSpaceListA to return FALSE\n");
691 "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
GetLastError());
694 ok(
ret ||
broken(!
ret) ,
"Expected SetupAddToDiskSpaceListA to succeed\n");
697 ok(
ret ||
broken(!
ret) ,
"Expected SetupAddToDiskSpaceListA to succeed\n");
700 "Expected SetupDestroyDiskSpaceList to succeed\n");
711 ok(
handle !=
NULL,
"Expected SetupCreateDiskSpaceListA to return a valid handle\n");
714 ok(
ret,
"Expected SetupQueryDrivesInDiskSpaceListA to succeed\n");
718 ok(
ret,
"Expected SetupQueryDrivesInDiskSpaceListA to succeed\n");
719 ok(
size == 1,
"Expected size 1, got %u\n",
size);
722 ok(
ret,
"Expected SetupAddToDiskSpaceListA to succeed\n");
725 ok(
ret,
"Expected SetupAddToDiskSpaceListA to succeed\n");
728 ok(
ret,
"Expected SetupAddToDiskSpaceListA to succeed\n");
731 ok(
ret,
"Expected SetupAddToDiskSpaceListA to succeed\n");
735 ok(
ret,
"Expected SetupQueryDrivesInDiskSpaceListA to succeed\n");
736 ok(
size == 10,
"Expected size 10, got %u\n",
size);
740 ok(!
ret,
"Expected SetupQueryDrivesInDiskSpaceListA to fail\n");
741 ok(
size == 4,
"Expected size 4, got %u\n",
size);
743 "Expected GetLastError() to return ERROR_INSUFFICIENT_BUFFER, got %u\n",
GetLastError());
747 ok(!
ret,
"Expected SetupQueryDrivesInDiskSpaceListA to fail\n");
748 ok(
size == 7,
"Expected size 7, got %u\n",
size);
750 "Expected GetLastError() to return ERROR_INSUFFICIENT_BUFFER, got %u\n",
GetLastError());
754 ok(!
ret,
"Expected SetupQueryDrivesInDiskSpaceListA to fail\n");
755 ok(
size == 10,
"Expected size 10, got %u\n",
size);
757 "Expected GetLastError() to return ERROR_INSUFFICIENT_BUFFER, got %u\n",
GetLastError());
762 ok(
ret,
"Expected SetupQueryDrivesInDiskSpaceListA to succeed\n");
763 ok(
size == 10,
"Expected size 10, got %u\n",
size);
764 ok(!
memcmp(
"f:\0g:\0x:\0\0",
buffer, 10),
"Device list does not match\n");
768 ok(
ret,
"Expected SetupQueryDrivesInDiskSpaceListA to succeed\n");
769 ok(!
memcmp(
"f:\0g:\0x:\0\0",
buffer, 10),
"Device list does not match\n");
772 "Expected SetupDestroyDiskSpaceList to succeed\n");
800 {
STD_HEADER "[a]\ntest,,,\n[SourceDisksFiles]\ntest=1,,4096\r\n",
802 "c:\00",
sizeof(
"c:\00"), {{
"c:", 4096}, {
NULL, 0}}},
804 {
STD_HEADER "[a]\ntest,,,\n[SourceDisksFiles]\ntest=1,,4096\r\n",
806 "c:\00",
sizeof(
"c:\00"), {{
"c:", 0}, {
NULL, 0}}},
810 "",
sizeof(
""), {{
NULL, 0}, {
NULL, 0}}},
812 {
STD_HEADER "[a]\ntest,,,\n[SourceDisksFiles]\ntest=1,,4096\n[DestinationDirs]\nDefaultDestDir=-1,F:\\test\r\n",
814 "f:\00",
sizeof(
"f:\00"), {{
"f:", 4096}, {
NULL, 0}}},
816 {
STD_HEADER "[a]\ntest,test2,,\n[SourceDisksFiles]\ntest2=1,,4096\r\n",
818 "c:\00",
sizeof(
"c:\00"), {{
"c:", 4096}, {
NULL, 0}}},
820 {
STD_HEADER "[a]\ntest,,,\n[SourceDisksFiles]\ntest=1,,4096\r\n",
822 "",
sizeof(
""), {{
NULL, 0}, {
NULL, 0}}},
824 {
STD_HEADER "[a]\ntest,,,\n[b]\ntest,,,\n[SourceDisksFiles]\ntest=1,,4096\r\n",
826 "c:\00",
sizeof(
"c:\00"), {{
"c:", 4096}, {
NULL, 0}}},
828 {
STD_HEADER "[a]\ntest,,,\n[b]\ntest,,,\n[SourceDisksFiles]\ntest=1,,4096\n[DestinationDirs]\nb=-1,F:\\test\r\n",
830 "c:\00f:\00",
sizeof(
"c:\00f:\00"), {{
"c:", 4096}, {
"f:", 4096}}},
832 {
STD_HEADER "[a]\ntest,test1,,\n[b]\ntest,test2,,\n[SourceDisksFiles]\ntest1=1,,4096\ntest2=1,,8192\r\n",
834 "c:\00",
sizeof(
"c:\00"), {{
"c:", 8192}, {
NULL, 0}}},
836 {
STD_HEADER "[a]\ntest1,test,,\n[b]\ntest2,test,,\n[SourceDisksFiles]\ntest=1,,4096\r\n",
838 "c:\00",
sizeof(
"c:\00"), {{
"c:", 8192}, {
NULL, 0}}},
869 ok(diskspace !=
NULL,
"Expected SetupCreateDiskSpaceListA to return a valid handle\n");
872 ok(!
ret,
"Expected SetupAddSectionToDiskSpaceListA to fail\n");
877 ok(!
ret,
"Expected SetupAddSectionToDiskSpaceListA to fail\n");
882 ok(!
ret,
"Expected SetupAddSectionToDiskSpaceListA to fail\n");
887 ok(
ret,
"Expected SetupAddSectionToDiskSpaceListA to succeed (%u)\n",
GetLastError());
890 "Expected SetupDestroyDiskSpaceList to succeed\n");
901 ok(diskspace !=
NULL,
"Expected SetupCreateDiskSpaceListA to return a valid handle\n");
903 for (
j = 0;
j < 2;
j++)
915 ok(!
ret,
"test %d: Expected adding section %d to fail\n",
i,
j);
923 ok(
ret,
"test %d: Expected SetupQueryDrivesInDiskSpaceListA to succeed (%u)\n",
i,
GetLastError());
925 "test %d: Device list (%s) does not match\n",
i,
buffer);
927 for (
j = 0;
j < 2;
j++)
935 ok(
ret,
"test %d: Expected SetupQuerySpaceRequiredOnDriveA to succeed for device %s (%u)\n",
937 ok(
space ==
usage->usage,
"test %d: Expected size %u for device %s, got %u\n",
942 "Expected SetupDestroyDiskSpaceList to succeed\n");
968 {
STD_HEADER "[a.Install]\nCopyFiles=a.CopyFiles\n"
969 "[a.CopyFiles]\ntest,,,\n[SourceDisksFiles]\ntest=1,,4096\r\n",
970 {{
"a.Install",
TRUE, 0}, {
NULL,
TRUE, 0}},
"c:\00",
sizeof(
"c:\00"), {{
"c:", 4096}, {
NULL, 0}}},
973 "[a.CopyFiles]\ntest,,,\n[SourceDisksFiles]\ntest=1,,4096\r\n",
974 {{
"a",
TRUE, 0}, {
NULL,
TRUE, 0}},
"c:\00",
sizeof(
"c:\00"), {{
"c:", 4096}, {
NULL, 0}}},
976 {
STD_HEADER "[a]\nCopyFiles=a.CopyFiles\nCopyFiles=a.CopyFiles2\n"
977 "[a.CopyFiles]\ntest,,,\n[a.CopyFiles2]\ntest2,,,\n"
978 "[SourceDisksFiles]\ntest=1,,4096\ntest2=1,,4096\r\n",
979 {{
"a",
TRUE, 0}, {
NULL,
TRUE, 0}},
"c:\00",
sizeof(
"c:\00"), {{
"c:", 8192}, {
NULL, 0}}},
981 {
STD_HEADER "[a]\nCopyFiles=a.CopyFiles,a.CopyFiles2\n"
982 "[a.CopyFiles]\ntest,,,\n[a.CopyFiles2]\ntest2,,,\n"
983 "[SourceDisksFiles]\ntest=1,,4096\ntest2=1,,4096\r\n",
984 {{
"a",
TRUE, 0}, {
NULL,
TRUE, 0}},
"c:\00",
sizeof(
"c:\00"), {{
"c:", 8192}, {
NULL, 0}}},
987 {{
"a",
TRUE, 0}, {
NULL,
TRUE, 0}},
"",
sizeof(
""), {{
NULL, 0}, {
NULL, 0}}},
990 "[a.nDelFiles]\ntest,,,\n[SourceDisksFiles]\ntest=1,,4096\r\n",
991 {{
"a",
TRUE, 0}, {
NULL,
TRUE, 0}},
"",
sizeof(
""), {{
NULL, 0}, {
NULL, 0}}},
993 {
STD_HEADER "[a]\nCopyFiles=a.CopyFiles\nDelFiles=a.DelFiles\n"
994 "[a.CopyFiles]\ntest,,,\n[a.DelFiles]\ntest,,,\n[SourceDisksFiles]\ntest=1,,4096\r\n",
995 {{
"a",
TRUE, 0}, {
NULL,
TRUE, 0}},
"c:\00",
sizeof(
"c:\00"), {{
"c:", 4096}, {
NULL, 0}}},
997 {
STD_HEADER "[a]\nCopyFiles=a.CopyFiles\n[b]\nDelFiles=b.DelFiles\n"
998 "[a.CopyFiles]\ntest,,,\n[b.DelFiles]\ntest,,,\n[SourceDisksFiles]\ntest=1,,4096\r\n",
999 {{
"a",
TRUE, 0}, {
"b",
TRUE, 0}},
"c:\00",
sizeof(
"c:\00"), {{
"c:", 4096}, {
NULL, 0}}},
1002 {{
"a",
TRUE, 0}, {
NULL,
TRUE, 0}},
"",
sizeof(
""), {{
NULL, 0}, {
NULL, 0}}},
1005 {{
"a",
TRUE, 0}, {
NULL,
TRUE, 0}},
"",
sizeof(
""), {{
NULL, 0}, {
NULL, 0}}},
1007 {
STD_HEADER "[a]\nCopyFiles=a.CopyFiles,b.CopyFiles\n[a.CopyFiles]\ntest,,,\n[b.CopyFiles]\ntest,,,\n"
1008 "[SourceDisksFiles]\ntest=1,,4096\n[DestinationDirs]\nb.CopyFiles=-1,F:\\test\r\n",
1009 {{
"a",
TRUE, 0}, {
NULL,
TRUE, 0}},
"c:\00f:\00",
sizeof(
"c:\00f:\00"), {{
"c:", 4096}, {
"f:", 4096}}},
1040 ok(diskspace !=
NULL,
"Expected SetupCreateDiskSpaceListA to return a valid handle\n");
1043 ok(
ret,
"Expected SetupAddInstallSectionToDiskSpaceListA to succeed\n");
1046 ok(!
ret,
"Expected SetupAddInstallSectionToDiskSpaceListA to fail\n");
1051 ok(!
ret ||
broken(
ret),
"Expected SetupAddSectionToDiskSpaceListA to fail\n");
1053 "Expected ERROR_INVALID_PARAMETER as error, got %u\n",
GetLastError());
1056 ok(
ret,
"Expected SetupAddInstallSectionToDiskSpaceListA to succeed (%u)\n",
GetLastError());
1059 "Expected SetupDestroyDiskSpaceList to succeed\n");
1070 ok(diskspace !=
NULL,
"Expected SetupCreateDiskSpaceListA to return a valid handle\n");
1072 for (
j = 0;
j < 2;
j++)
1084 ok(!
ret,
"test %d: Expected adding section %d to fail\n",
i,
j);
1092 ok(
ret,
"test %d: Expected SetupQueryDrivesInDiskSpaceListA to succeed (%u)\n",
i,
GetLastError());
1094 "test %d: Device list (%s) does not match\n",
i,
buffer);
1096 for (
j = 0;
j < 2;
j++)
1104 ok(
ret,
"test %d: Expected SetupQuerySpaceRequiredOnDriveA to succeed for device %s (%u)\n",
1106 ok(
space ==
usage->usage,
"test %d: Expected size %u for device %s, got %u\n",
1111 "Expected SetupDestroyDiskSpaceList to succeed\n");
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
ACPI_SIZE strlen(const char *String)
#define ERROR_INSUFFICIENT_BUFFER
#define ERROR_CALL_NOT_IMPLEMENTED
#define ERROR_INVALID_PARAMETER
#define INVALID_HANDLE_VALUE
#define CreateFileA(a, b, c, d, e, f, g)
#define ERROR_INVALID_HANDLE
#define FILE_ATTRIBUTE_NORMAL
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
UINT WINAPI GetWindowsDirectoryA(OUT LPSTR lpBuffer, IN UINT uSize)
DWORD WINAPI GetTempPathA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
HDSKSPC WINAPI SetupDuplicateDiskSpaceListW(HDSKSPC DiskSpace, PVOID Reserved1, DWORD Reserved2, UINT Flags)
HDSKSPC WINAPI SetupDuplicateDiskSpaceListA(HDSKSPC DiskSpace, PVOID Reserved1, DWORD Reserved2, UINT Flags)
BOOL WINAPI SetupQuerySpaceRequiredOnDriveA(HDSKSPC DiskSpace, LPCSTR DriveSpec, LONGLONG *SpaceRequired, PVOID Reserved1, UINT Reserved2)
BOOL WINAPI SetupQuerySpaceRequiredOnDriveW(HDSKSPC DiskSpace, LPCWSTR DriveSpec, LONGLONG *SpaceRequired, PVOID Reserved1, UINT Reserved2)
HDSKSPC WINAPI SetupCreateDiskSpaceListW(PVOID Reserved1, DWORD Reserved2, UINT Flags)
BOOL WINAPI SetupAddToDiskSpaceListA(HDSKSPC diskspace, PCSTR targetfile, LONGLONG filesize, UINT operation, PVOID reserved1, UINT reserved2)
BOOL WINAPI SetupDestroyDiskSpaceList(HDSKSPC DiskSpace)
HDSKSPC WINAPI SetupCreateDiskSpaceListA(PVOID Reserved1, DWORD Reserved2, UINT Flags)
BOOL WINAPI SetupAddInstallSectionToDiskSpaceListA(HDSKSPC DiskSpace, HINF InfHandle, HINF LayoutInfHandle, LPCSTR SectionName, PVOID Reserved1, UINT Reserved2)
HINF WINAPI SetupOpenInfFileA(PCSTR name, PCSTR class, DWORD style, UINT *error)
UINT WINAPI GetTempFileNameA(IN LPCSTR lpPathName, IN LPCSTR lpPrefixString, IN UINT uUnique, OUT LPSTR lpTempFileName)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLsizeiptr const GLvoid GLenum usage
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
static const WCHAR emptyW[]
#define sprintf(buf, format,...)
static DWORD get_file_size(void)
static HINF inf_open_file_content(const char *tmpfilename, const char *data, UINT *err_line)
static void test_SetupDuplicateDiskSpaceListW(void)
static const struct @1702 section_test[]
struct section sections[2]
static void test_SetupCreateDiskSpaceListA(void)
static const struct @1703 section_test_i[]
static void test_SetupAddSectionToDiskSpaceListA(void)
static void test_SetupQuerySpaceRequiredOnDriveW(void)
static const char * debugstr_longlong(ULONGLONG ll)
static void test_SetupCreateDiskSpaceListW(void)
static void test_SetupQueryDrivesInDiskSpaceListA(void)
static void test_SetupDuplicateDiskSpaceListA(void)
static void test_SetupAddInstallSectionToDiskSpaceListA(void)
static void test_SetupQuerySpaceRequiredOnDriveA(void)
static void test_SetupAddToDiskSpaceListA(void)
static const char tmpfilename[]
#define SPDSL_IGNORE_DISK
WINSETUPAPI BOOL WINAPI SetupQueryDrivesInDiskSpaceListA(_In_ HDSKSPC DiskSpace, _Out_writes_opt_(ReturnBufferSize) PSTR ReturnBuffer, _In_ DWORD ReturnBufferSize, _Out_opt_ PDWORD RequiredSize)
#define ERROR_SECTION_NOT_FOUND
WINSETUPAPI BOOL WINAPI SetupAddSectionToDiskSpaceListA(_In_ HDSKSPC, _In_ HINF, _In_opt_ HINF, _In_ PCSTR, _In_ UINT, _Reserved_ PVOID, _Reserved_ UINT)
#define ERROR_LINE_NOT_FOUND
VOID WINAPI SetupCloseInfFile(IN HINF InfHandle)
DWORD WINAPI GetLastError(void)
#define ERROR_INVALID_DRIVE