update cabinet winetest to wine 1.1.36
svn path=/trunk/; revision=45118
+static void free_file_node(struct FILELIST *node)
+{
+ HeapFree(GetProcessHeap(), 0, node->FileName);
+ HeapFree(GetProcessHeap(), 0, node);
+}
+
+static void free_file_list(SESSION* session)
+{
+ struct FILELIST *next, *curr = session->FileList;
+
+ while (curr)
+ {
+ next = curr->next;
+ free_file_node(curr);
+ curr = next;
+ }
+
+ session->FileList = NULL;
+}
+
static void test_Extract(void)
{
SESSION session;
static void test_Extract(void)
{
SESSION session;
ok(check_list(&node, "testdir\\c.txt", FALSE), "list entry wrong\n");
ok(check_list(&node, "b.txt", FALSE), "list entry wrong\n");
ok(check_list(&node, "a.txt", FALSE), "list entry wrong\n");
ok(check_list(&node, "testdir\\c.txt", FALSE), "list entry wrong\n");
ok(check_list(&node, "b.txt", FALSE), "list entry wrong\n");
ok(check_list(&node, "a.txt", FALSE), "list entry wrong\n");
+ free_file_list(&session);
/* try fill file list operation */
ZeroMemory(&session, sizeof(SESSION));
/* try fill file list operation */
ZeroMemory(&session, sizeof(SESSION));
ok(check_list(&node, "a.txt", FALSE), "list entry wrong\n");
/* remove two of the files in the list */
ok(check_list(&node, "a.txt", FALSE), "list entry wrong\n");
/* remove two of the files in the list */
+ node = session.FileList->next;
session.FileList->next = session.FileList->next->next;
session.FileList->next = session.FileList->next->next;
+ free_file_node(node);
+ free_file_node(session.FileList->next->next);
session.FileList->next->next = NULL;
session.FilterList = NULL;
CreateDirectoryA("dest", NULL);
session.FileList->next->next = NULL;
session.FilterList = NULL;
CreateDirectoryA("dest", NULL);
ok(!check_list(&node, "testdir\\c.txt", FALSE), "list entry wrong\n");
ok(check_list(&node, "b.txt", FALSE), "list entry wrong\n");
ok(!check_list(&node, "a.txt", FALSE), "list entry wrong\n");
ok(!check_list(&node, "testdir\\c.txt", FALSE), "list entry wrong\n");
ok(check_list(&node, "b.txt", FALSE), "list entry wrong\n");
ok(!check_list(&node, "a.txt", FALSE), "list entry wrong\n");
+ free_file_list(&session);
session.Operation = EXTRACT_FILLFILELIST;
session.FileList = NULL;
session.Operation = EXTRACT_FILLFILELIST;
session.FileList = NULL;
ok(check_list(&node, "testdir\\c.txt", FALSE), "list entry wrong\n");
ok(check_list(&node, "b.txt", FALSE), "list entry wrong\n");
ok(check_list(&node, "a.txt", FALSE), "list entry wrong\n");
ok(check_list(&node, "testdir\\c.txt", FALSE), "list entry wrong\n");
ok(check_list(&node, "b.txt", FALSE), "list entry wrong\n");
ok(check_list(&node, "a.txt", FALSE), "list entry wrong\n");
+ free_file_list(&session);
/* cabinet does not exist */
ZeroMemory(&session, sizeof(SESSION));
/* cabinet does not exist */
ZeroMemory(&session, sizeof(SESSION));
ok(!check_list(&node, "testdir\\c.txt", FALSE), "list entry should not exist\n");
ok(!check_list(&node, "b.txt", FALSE), "list entry should not exist\n");
ok(!check_list(&node, "a.txt", FALSE), "list entry should not exist\n");
ok(!check_list(&node, "testdir\\c.txt", FALSE), "list entry should not exist\n");
ok(!check_list(&node, "b.txt", FALSE), "list entry should not exist\n");
ok(!check_list(&node, "a.txt", FALSE), "list entry should not exist\n");
+ free_file_list(&session);
/* first file exists */
createTestFile("dest\\a.txt");
/* first file exists */
createTestFile("dest\\a.txt");
ok(!check_list(&node, "b.txt", FALSE), "list entry should not exist\n");
}
ok(!check_list(&node, "a.txt", FALSE), "list entry should not exist\n");
ok(!check_list(&node, "b.txt", FALSE), "list entry should not exist\n");
}
ok(!check_list(&node, "a.txt", FALSE), "list entry should not exist\n");
+ free_file_list(&session);
SetFileAttributesA("dest\\a.txt", FILE_ATTRIBUTE_NORMAL);
DeleteFileA("dest\\a.txt");
SetFileAttributesA("dest\\a.txt", FILE_ATTRIBUTE_NORMAL);
DeleteFileA("dest\\a.txt");
ok(!check_list(&node, "testdir\\d.txt", FALSE), "list entry should not exist\n");
ok(!check_list(&node, "testdir\\c.txt", FALSE), "list entry wrong\n");
ok(!check_list(&node, "b.txt", FALSE), "list entry wrong\n");
ok(!check_list(&node, "testdir\\d.txt", FALSE), "list entry should not exist\n");
ok(!check_list(&node, "testdir\\c.txt", FALSE), "list entry wrong\n");
ok(!check_list(&node, "b.txt", FALSE), "list entry wrong\n");
- ok(check_list(&node, "a.txt", TRUE), "list entry wrong\n");
+ ok(!check_list(&node, "a.txt", TRUE), "list entry wrong\n");
+ free_file_list(&session);
SetFileAttributesA("dest\\testdir\\c.txt", FILE_ATTRIBUTE_NORMAL);
DeleteFileA("dest\\testdir\\c.txt");
SetFileAttributesA("dest\\testdir\\c.txt", FILE_ATTRIBUTE_NORMAL);
DeleteFileA("dest\\testdir\\c.txt");