(file) Return to cabinet_fdi.c CVS log (file) (dir) Up to [RizwankCVS] / group3 / wine / dlls / cabinet / tests

  1 rizwank 1.1 /*
  2              * Unit test suite for cabinet.dll - FDI functions
  3              *
  4              * Copyright 2004 Rizwan Kassim, Dan Kegel
  5              *
  6              * This library is free software; you can redistribute it and/or
  7              * modify it under the terms of the GNU Lesser General Public
  8              * License as published by the Free Software Foundation; either
  9              * version 2.1 of the License, or (at your option) any later version.
 10              *
 11              * This library is distributed in the hope that it will be useful,
 12              * but WITHOUT ANY WARRANTY; without even the implied warranty of
 13              * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 14              * Lesser General Public License for more details.
 15              *
 16              * You should have received a copy of the GNU Lesser General Public
 17              * License along with this library; if not, write to the Free Software
 18              * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 19              */
 20             
 21             #include <stdlib.h>
 22 rizwank 1.1 
 23             #ifndef STANDALONE
 24             #include <wine/test.h>
 25             #define ok2 ok
 26             #else
 27             /* To build outside Wine tree, compile with cl -DSTANDALONE -D_X86_ cabinet_fdi.c FDI.lib 
 28               These are only called if standalone are used, defining ok and START_TEST, which would normally be declared in winetree */
 29             #include <assert.h> 
 30             #include <stdio.h>
 31             #define START_TEST(name) main(int argc, char **argv)
 32             #define ok(condition, msg)       \
 33             	do { if(!(condition)) {  \
 34             		fprintf(stderr,"failed at %d, msg:" msg "\n",__LINE__); \
 35             		exit(1);         \
 36             	} } while(0)
 37             #define ok2(condition, msg, arg) \
 38                     do { if(!(condition)) {  \
 39             		fprintf(stderr,"failed at %d, msg:" msg "\n",__LINE__, arg); \
 40             		exit(1);         \
 41             	} } while(0)
 42             #define todo_wine
 43 rizwank 1.1 #endif 
 44             
 45             #include <winerror.h>
 46             #include <fdi.h>
 47 rizwank 1.7 #include <fcntl.h>
 48             
 49 rizwank 1.8 /* Do malloc and free output debug messages? 
 50             #define DEBUG_ALLOC
 51             */
 52 rizwank 1.7 
 53 rizwank 1.8 /* What is our "Fake" Filedescriptor? */
 54             static int fakeFD = 22881;
 55 rizwank 1.7 
 56 rizwank 1.8 /* 
 57 rizwank 2.0    This hex data is the output of makecab.exe (Windows Cabinet SDK/bin)
 58                ****** IS USING THE OUTPUT OF A NON LGPL program okay ******
 59 rizwank 1.8    
 60                The cab file is mirrored in the file system as simple.cab
 61                
 62                The 'test.txt' in the cab file contains the string 'So long, and thanks for all the fish.'
 63             */
 64 rizwank 1.7 static unsigned char compressed_file[] = 
 65                {0x4D,0x53,0x43,0x46,0x00,0x00,0x00,0x00,0x75,0x00,
 66             	0x00,0x00,0x00,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,
 67             	0x00,0x00,0x00,0x00,0x03,0x01,0x01,0x00,0x01,0x00,
 68             	0x00,0x00,0x39,0x30,0x00,0x00,0x45,0x00,0x00,0x00,
 69             	0x01,0x00,0x01,0x00,0x26,0x00,0x00,0x00,0x00,0x00,
 70             	0x00,0x00,0x00,0x00,0x4A,0x32,0xB2,0xBE,0x20,0x00,
 71             	0x74,0x65,0x73,0x74,0x2E,0x74,0x78,0x74,0x00,0x9C,
 72             	0x74,0xD0,0x75,0x28,0x00,0x26,0x00,0x43,0x4B,0x0B,
 73             	0xCE,0x57,0xC8,0xC9,0xCF,0x4B,0xD7,0x51,0x48,0xCC,
 74             	0x4B,0x51,0x28,0xC9,0x48,0xCC,0xCB,0x2E,0x56,0x48,
 75             	0xCB,0x2F,0x52,0x48,0xCC,0xC9,0x01,0x72,0x53,0x15,
 76             	0xD2,0x32,0x8B,0x33,0xF4,0xB8,0x00};
 77             static int szcompressed_file = sizeof(compressed_file);
 78             
 79 rizwank 2.0 /*
 80             	Multiple File Cabs are included, as cabinet.dll supports multiple file archive types.
 81             	The compressed file size had to be greater than 50k, cabarc restricts 'diskette spanning' to 
 82             	  archives above 50k.
 83             	The peculiar options were selected specifically to test cabinet.dll more throughly.
 84             	
 85             	complex_lzw.cab  	cabarc -m LZX:16 -pr -i 32356 N complex_lzw.cab amontillado.txt lgpl.txt gpl.txt midsummer\*
 86             	complex_lzw2.cab 	cabarc -m LZX:17 -d 50000 -pr -i 32356 N complex_lzw*.cab amontillado.txt + lgpl.txt gpl.txt midsummer\*
 87 rizwank 1.8 
 88 rizwank 2.0 	complex_zip.cab  	cabarc -m MSZIP -pr -i 32356 N complex_lzw.cab amontillado.txt lgpl.txt gpl.txt midsummer\*
 89             	complex_zip2.cab 	cabarc -m MSZIP -d 50000 -pr -i 32356 N complex_zip*.cab amontillado.txt + lgpl.txt gpl.txt midsummer\*
 90 rizwank 1.7 
 91 rizwank 2.0 	complex_none.cab	cabarc -m NONE -pr -i 32356 N complex_none.cab amontillado.txt midsummer\act1*
 92 rizwank 1.1 
 93 rizwank 1.8 /*	
 94             	To do in FDI:				-from wine/include/fdi.h
 95 rizwank 1.1 	FDICreate
 96             		File Write				-FNWRITE(hf, pv, cb)
 97             		File Seek				-FNSEEK(hf,dist,seektype)
 98             		Error Structure
 99             	FDICopy
100             		Notification function
101             		Decryption function
102             	FDIDestroy
103             */
104             
105 rizwank 1.8 #ifndef DEBUG_ALLOC
106             FNALLOC(final_alloc) {
107             	return malloc(cb);
108             }
109             FNFREE(final_free) {
110             	free(pv);
111             	return;
112             }
113             #else
114             FNALLOC(final_alloc) {
115 rizwank 1.5  	printf("   FNALLOC just called with %d\n",cb);
116             	return malloc(cb);
117 rizwank 1.3 }
118 rizwank 1.8 FNFREE(final_free) {
119 rizwank 1.5 	printf("   FNFREE just called with %d\n",pv);
120             	free(pv);
121 rizwank 1.3 	return;
122             }
123 rizwank 1.8 #endif
124             
125 rizwank 1.3 
126 rizwank 1.5 /*
127 rizwank 1.7 	Match i/o specs of _open, _read, _write, _close, and _lseek.
128             */
129             
130             /*	
131 rizwank 1.8 	http://msdn.microsoft.com/library/en-us/vclib/html/_crt__open.2c_._wopen.asp
132 rizwank 1.7 	_open 		I: const char *filename, int oflag, int pmode	O: int (handler), -1 for err.
133 rizwank 1.8 	DUMMY  : FUNCTIONAL		FAKE : FUNCTIONAL 		REAL : FUNCTIONAL
134 rizwank 1.5 */
135             
136 rizwank 1.3 FNOPEN(dummy_open) {
137 rizwank 1.8 	printf("  FNOPEN (dummy) just called with %d, %d, %d\n",pszFile, oflag, pmode);
138 rizwank 1.3 	return 0;
139             }
140             
141 rizwank 1.7 FNOPEN(fake_open) {
142 rizwank 1.8 	printf("  FNOPEN (fake) just called with %d, %d, %d\n",pszFile, oflag, pmode);
143             	printf("  Returning %d as file descriptor\n",fakeFD);
144 rizwank 1.7 	return 12;
145             }
146             
147             FNOPEN(real_open) {
148             	int handler = _open(pszFile,oflag,pmode);
149             	printf("   FNOPEN (real) just called with %s, %d, %d\n",pszFile, oflag, pmode);
150             	printf("   FNOPEN (real) returning handler (%d)\n",handler);
151             	return handler;
152             }
153             
154             /*
155 rizwank 1.8 	http://msdn.microsoft.com/library/en-us/vclib/html/_CRT__read.asp	
156 rizwank 1.7 	_read		I: int fd, void *buffer, unsigned int count		O:	int (szBuffer)
157 rizwank 1.8 	DUMMY  : FUNCTIONAL		FAKE : FUNCTIONAL, INCOMPLETE		REAL : FUNCTIONAL
158 rizwank 1.7 */
159             
160 rizwank 1.3 FNREAD(dummy_read) {
161 rizwank 1.8 	printf("   FNREAD (dummy) just called with %d, %d, %d\n",hf, pv, cb);
162 rizwank 1.5 	return 0;
163 rizwank 1.3 }
164 rizwank 1.7 
165 rizwank 1.8 /* Doesn't keep virtual file location pointer */
166 rizwank 1.7 FNREAD(fake_read) {
167 rizwank 1.8 	printf("   FNREAD (fake) just called with %d, %d, %d\n",hf, pv, cb);
168             	if (hf == fakeFD) {
169             		printf ("   Called with fake file descriptor, populating buffer and size (%d)\n",cb);
170             		memcpy (pv, compressed_file ,cb);
171             		}
172             	else {
173             		printf ("   FNREAD (fake) was called with the unknown file handler. Failed!\n",hf);
174             	}
175             	return cb;
176 rizwank 1.7 }
177             
178             FNREAD(real_read) {
179             	int szBuffer = _read(hf,pv,cb);
180             	printf("   FNREAD (read) just called with %d, %d, %d\n",hf, pv, cb);
181             	printf("   FNREAD (read) returning size (%d)\n",szBuffer);
182             	return szBuffer;
183             }
184             
185 rizwank 1.8 /*
186             	http://msdn.microsoft.com/library/en-us/vclib/html/_CRT__close.asp
187             	_close		I: int fd   O:	int (0=success 1=failure)
188             	DUMMY  : FUNCTIONAL		FAKE : FUNCTIONAL 		REAL : FUNCTIONAL
189             */
190 rizwank 1.7 
191 rizwank 1.8 FNCLOSE(dummy_close) {
192             	printf("   FNCLOSE (dummy) just called with %d - returning %d\n",hf,0);	
193 rizwank 1.5 	return 0;
194 rizwank 1.3 }
195             
196 rizwank 1.8 FNCLOSE(fake_close) {
197             	printf("   FNCLOSE (fake) just called with %d - returning %d\n",hf,0);	
198             	return 0;
199             }
200 rizwank 1.3 
201 rizwank 1.8 FNCLOSE(real_close) {
202             	int closevalue = _close(hf);
203             	printf("   FNCLOSE (real) just called with %d - returning %d\n",hf,closevalue);	
204             	return closevalue;
205             }
206             
207             	
208 rizwank 2.0 
209             
210             
211 rizwank 1.8 FNWRITE(dummy_write) {
212             	printf("   FNWRITE just called with %d, %d, %d\n",hf, pv, cb);
213 rizwank 1.5 	return 0;
214 rizwank 1.3 }
215 rizwank 1.1 
216 cs130_alex 2.1 FNWRITE(real_write) {
217                	int write_value = _write(hf, pv, cb);
218                	printf("   FNWRITE just called with %d, %d, %d - returning %d\n",hf, pv, cb, write_value);
219                	return write_value;
220                }
221                
222                
223                
224                
225 rizwank    1.3 FNSEEK(dummy_seek) {
226 rizwank    1.8 	printf("   FNSEEK just called with %d, %d, %d\n",hf, dist, seektype);	
227 rizwank    1.5 	return 0;
228 rizwank    1.3 }
229                
230 cs130_alex 2.1 FNSEEK(real_seek) {
231                	long lseek_value = _lseek(hf, dist, seektype);
232                	printf("   FNSEEK just called with %d, %d, %d - returning %d\n",hf, dist, seektype,lseek_value);	
233                	return lseek_value;
234                }
235                
236                
237                
238                
239                
240                FNFDINOTIFY(dummy_notification){
241                	printf("   FNFDINOTIFY just called with %d, %d \n",fdint,pfdin);	
242                	return 0;
243                }
244                
245                FNFDINOTIFY(notification_function)
246                {
247                	printf("   FNFDINOTIFY just called with %d, %d \n",fdint,pfdin);	
248                	switch (fdint)
249                	{
250                		case fdintCABINET_INFO: 
251 cs130_alex 2.1 			printf("fdintCABINET_INFO\n");
252                			return 0;
253                
254                		case fdintPARTIAL_FILE: 
255                			printf("dintPARTIAL_FILE\n");	
256                			return 0;
257                
258                		case fdintCOPY_FILE:
259                			printf("fdintCOPY_FILE\n");
260                			return 0;
261                
262                		case fdintCLOSE_FILE_INFO:	
263                			printf("fdintCLOSE_FILE_INFO\n");
264                			return 0;
265                
266                		case fdintNEXT_CABINET:	
267                			printf("fdintNEXT_CABINET\n");
268                			return 0;
269                	}
270                	return 0;
271                }
272 cs130_alex 2.1 
273                
274                
275                
276                static void printCabInfo(FDICABINETINFO  cabinfo){
277                	//printf("INSIDE PRINT CABINFO\n");
278                		printf("Cabinet Data : cbC %d cF %d cFi %d si %d iC %d fr %b hp %d hn %d\n",
279                		cabinfo.cbCabinet,
280                		cabinfo.cFolders ,
281                		cabinfo.cFiles ,
282                		cabinfo.setID,
283                		cabinfo.iCabinet,
284                		cabinfo.fReserve ,
285                		cabinfo.hasprev ,
286                		cabinfo.hasnext );
287                }
288                
289                static void CheckCabInfo(FDICABINETINFO cabinfo, 
290                						 long        TcbCabinet,
291                						 USHORT      TcFolders,               
292                						 USHORT      TcFiles,                
293 cs130_alex 2.1 						 USHORT      TsetID,             
294                						 USHORT      TiCabinet,             
295                						 BOOL        TfReserve,              
296                						 BOOL        Thasprev,               
297                						 BOOL        Thasnext){
298                
299                							 ok ( cabinfo.cbCabinet == TcbCabinet, "FDIIsCabinet,cabinfo (FakeFile = Cabinet) data did not match! Failed!\n");
300                							 ok ( cabinfo.cFolders == TcFolders, "FDIIsCabinet,cabinfo (FakeFile = Cabinet) data did not match! Failed!\n");
301                							 ok ( cabinfo.cFiles == TcFiles, "FDIIsCabinet,cabinfo (FakeFile = Cabinet) data did not match! Failed!\n");
302                							 ok ( cabinfo.setID == TsetID, "FDIIsCabinet,cabinfo (FakeFile = Cabinet) data did not match! Failed!\n");
303                							 ok ( cabinfo.iCabinet == TiCabinet, "FDIIsCabinet,cabinfo (FakeFile = Cabinet) data did not match! Failed!\n");
304                							 ok ( cabinfo.fReserve == TfReserve, "FDIIsCabinet,cabinfo (FakeFile = Cabinet) data did not match! Failed!\n");
305                							 ok ( cabinfo.hasprev == Thasprev, "FDIIsCabinet,cabinfo (FakeFile = Cabinet) data did not match! Failed!\n");
306                							 ok ( cabinfo.hasnext == Thasnext, "FDIIsCabinet,cabinfo (FakeFile = Cabinet) data did not match! Failed!\n");
307                						}
308                
309                
310 rizwank    2.0 
311                
312 rizwank    1.7 HFDI hfdi_unknown_dummy, hfdi_unknown_fake,hfdi_unknown_real;
313 rizwank    1.4 /* yes its global and ugly */
314                
315 rizwank    2.0 /* Is CPU386 or Unknown more commonly used? */
316 rizwank    1.1 
317 rizwank    1.4 static void TestCreate(void) {
318                			
319                	ERF error_structure;
320                	
321                	printf("Starting TestCreate()\n");
322                	
323 rizwank    1.7 	hfdi_unknown_dummy = FDICreate(
324 rizwank    1.8 		final_alloc,
325                		final_free,
326 rizwank    1.5 		dummy_open,
327                		dummy_read,
328                		dummy_write,
329                		dummy_close,
330                		dummy_seek,
331                		cpuUNKNOWN,
332                		&error_structure
333                	);
334 rizwank    1.7 	ok(hfdi_unknown_dummy != NULL,"FDICreate (CPU = unknown) (functions=dummy) failed!\n");		
335                
336                	hfdi_unknown_fake = FDICreate(
337 rizwank    1.8 		final_alloc,
338                		final_free,
339 rizwank    1.7 		fake_open,
340                		fake_read,
341                		dummy_write,
342                		dummy_close,
343                		dummy_seek,
344                		cpuUNKNOWN,
345                		&error_structure
346                	);
347                	ok(hfdi_unknown_fake != NULL,"FDICreate (CPU = unknown) (functions=fake) failed!\n");		
348                
349                	hfdi_unknown_real = FDICreate(
350 rizwank    1.8 		final_alloc,
351                		final_free,
352 rizwank    1.7 		real_open,
353                		real_read,
354 cs130_alex 2.1 		real_write,
355 rizwank    1.8 		real_close,
356 cs130_alex 2.1 		real_seek,
357 rizwank    1.7 		cpuUNKNOWN,
358                		&error_structure
359                	);
360                	ok(hfdi_unknown_real != NULL,"FDICreate (CPU = unknown) (functions=real) failed!\n");		
361                		
362                	printf("Ending TestCreate()\n");		
363                }
364                
365 cs130_alex 2.1 
366                
367                
368 rizwank    1.7 static void TestInfo(void) {
369 rizwank    1.8 	/* Noticed Behavior :
370                		FDIIsCabinet does not open the file on its own, it requires a file open/close to be done externally.
371                			WHY?
372                		The only functions in HFDI that FDIIsCabinet directly accesses is FNREAD
373                		Important cases to check :
374                			If the filedescriptor == ERR, does it FAIL?							(dummy_read)
375                			If the filedescriptor == NOTCABINET, does it FAIL?					(fake_read, real_read)
376                			If the filedescriptor == CABINET, does it SUCCEED?					(fake_read, real_read)
377                			If the filedescriptor == CABINET, does it populate FDICABINETINFO?	(fake_read, real_read)
378                	*/
379                	
380 rizwank    1.7 	int realfd;
381                	int sizer;
382 rizwank    1.8 	FDICABINETINFO  fdi_cabinfo_dummy, fdi_cabinfo_simple, fdi_cabinfo_complex;
383 rizwank    1.7 	
384                	printf("Starting TestInfo()\n");
385 rizwank    1.8 
386                	/* TEST : ERR filehandle associated, dummy functions should return FALSE */
387                	ok ( FDIIsCabinet( hfdi_unknown_dummy, -1, &fdi_cabinfo_dummy) == FALSE,
388 rizwank    1.7 			"FDIIsCabinet (File = Error) failed!\n");	
389 rizwank    1.8 
390                	/* TEST : Fake filehandle associated, memory manually copied, should return TRUE */
391                	ok ( FDIIsCabinet( hfdi_unknown_fake, fakeFD, &fdi_cabinfo_simple) == TRUE,
392                			"FDIIsCabinet (FakeFile = Cabinet) failed!\n");
393                	
394 cs130_alex 2.1 		CheckCabInfo(fdi_cabinfo_simple,117,1,1,12345,0,0,0,0);
395 rizwank    1.8 		
396 rizwank    2.0 	/* simply this with macros?
397                	       yes, make one macro with inputs (cabname, testname, [expected values] ) --- using lambda notation
398                	   add checks for cabinfo data! 
399                	   Is it ok to reuse the same hfdi_unknown_real ? */
400                
401                	/* TEST : Opened filehandle associated, corrupted cab loaded, should return FALSE */
402                	/* We can see that the Windows implementation only reads the first 36 bytes - what if we corrupted a CAB after 36 bytes?*/
403                
404                	realfd = real_open( "broken.cab" , _O_BINARY | _O_RDONLY | _O_SEQUENTIAL, 0);
405                	
406                	ok ( FDIIsCabinet( hfdi_unknown_real, realfd, &fdi_cabinfo_complex) == FALSE,
407                			"FDIIsCabinet (File = Bad-Cabinet) broken.cab failed!\n");
408                	real_close(realfd);				
409                			
410                	realfd = real_open( "cabinet_fdi.c" , _O_BINARY | _O_RDONLY | _O_SEQUENTIAL, 0);
411                	
412                	ok ( FDIIsCabinet( hfdi_unknown_real, realfd, &fdi_cabinfo_complex) == FALSE,
413                			"FDIIsCabinet (File = Non-Cabinet) cabinet_fdi.c failed!\n");
414                	real_close(realfd);	
415                	
416                	
417 rizwank    2.0 	/* TEST : Opened filehandle associated, valid cab loaded, should return TRUE */					
418                	realfd = real_open( "complex_lzw.cab" , _O_BINARY | _O_RDONLY | _O_SEQUENTIAL, 0);
419                	
420                	ok ( FDIIsCabinet( hfdi_unknown_real, realfd, &fdi_cabinfo_complex) == TRUE,
421                			"FDIIsCabinet (File = Cabinet) complex_lzw.cab failed!\n");
422                	real_close(realfd);
423                	
424 cs130_alex 2.1 	printCabInfo(fdi_cabinfo_complex);
425 rizwank    2.0 
426                	realfd = real_open( "complex_lzw2.cab" , _O_BINARY | _O_RDONLY | _O_SEQUENTIAL, 0);
427                	
428                	ok ( FDIIsCabinet( hfdi_unknown_real, realfd, &fdi_cabinfo_complex) == TRUE,
429                			"FDIIsCabinet (File = Cabinet) complex_lzw2.cab failed!\n");
430                	real_close(realfd);
431                	
432 cs130_alex 2.1 	printCabInfo(fdi_cabinfo_complex);
433 rizwank    2.0 
434                	realfd = real_open( "complex_zip.cab" , _O_BINARY | _O_RDONLY | _O_SEQUENTIAL, 0);
435                	
436 rizwank    1.8 	ok ( FDIIsCabinet( hfdi_unknown_real, realfd, &fdi_cabinfo_complex) == TRUE,
437 rizwank    2.0 			"FDIIsCabinet (File = Cabinet) complex_zip.cab failed!\n");
438 rizwank    1.8 	real_close(realfd);
439 rizwank    1.7 	
440 cs130_alex 2.1 	printCabInfo(fdi_cabinfo_complex);
441 rizwank    2.0 
442                	realfd = real_open( "complex_zip2.cab" , _O_BINARY | _O_RDONLY | _O_SEQUENTIAL, 0);
443                	
444                	ok ( FDIIsCabinet( hfdi_unknown_real, realfd, &fdi_cabinfo_complex) == TRUE,
445                			"FDIIsCabinet (File = Cabinet) complex_zip2.cab failed!\n");
446                	real_close(realfd);
447                	
448 cs130_alex 2.1 
449                	printCabInfo(fdi_cabinfo_complex);
450 rizwank    2.0 
451                	realfd = real_open( "complex_none.cab" , _O_BINARY | _O_RDONLY | _O_SEQUENTIAL, 0);
452                	
453                	ok ( FDIIsCabinet( hfdi_unknown_real, realfd, &fdi_cabinfo_complex) == TRUE,
454                			"FDIIsCabinet (File = Cabinet) complex_zip.cab failed!\n");
455                	real_close(realfd);
456                	
457 cs130_alex 2.1 
458                	printCabInfo(fdi_cabinfo_complex);
459 rizwank    2.0 
460 rizwank    1.7 	
461                }
462 cs130_alex 2.1 
463                static void TestCopy(void){
464                	printf("Starting TestCopy()\n");
465                	printf("---simple.cab\n");
466                	FDICopy(hfdi_unknown_real,
467                			"simple.cab",
468                			"C:\\cygwin\\home\\Administrator\\group3\\wine\\dlls\\cabinet\\tests\\",
469                			0,
470                			notification_function,
471                			NULL,
472                			NULL);
473                	printf("---complex_none.cab\n");
474                	FDICopy(hfdi_unknown_real,
475                		"complex_none.cab",
476                		"C:\\cygwin\\home\\Administrator\\group3\\wine\\dlls\\cabinet\\tests\\",
477                		0,
478                		notification_function,
479                		NULL,
480                		NULL);
481                	printf("---complex_zip.cab\n");
482                    FDICopy(hfdi_unknown_real,
483 cs130_alex 2.1 		"complex_zip.cab",
484                		"C:\\cygwin\\home\\Administrator\\group3\\wine\\dlls\\cabinet\\tests\\",
485                		0,
486                		notification_function,
487                		NULL,
488                		NULL);
489                	printf("---complex_lzw.cab\n");
490                	FDICopy(hfdi_unknown_real,
491                		"complex_lzw.cab",
492                		"C:\\cygwin\\home\\Administrator\\group3\\wine\\dlls\\cabinet\\tests\\",
493                		0,
494                		notification_function,
495                		NULL,
496                		NULL);
497                
498                
499                	printf("Ending TestCopy()\n");
500                }
501                
502 rizwank    1.7 		
503                static void TestDestroy(void) {
504                	printf("Starting TestDestroy()\n");
505 rizwank    2.0 		/* Should return TRUE if given a valid hfdi, else FALSE (only due to context errors?) */
506                									
507 rizwank    1.7 	ok(FDIDestroy(hfdi_unknown_dummy), "FDIDestroy (CPU = unknown) (functions=fake) failed!\n");
508                	ok(FDIDestroy(hfdi_unknown_fake), "FDIDestroy (CPU = unknown) (functions=fake) failed!\n");		
509 rizwank    2.0 	ok(FDIDestroy(hfdi_unknown_real), "FDIDestroy (CPU = unknown) (functions=real) failed!\n");	
510 rizwank    1.7 	printf("Ending TestDestroy()\n");
511 rizwank    1.5 		
512 rizwank    1.4 }
513 rizwank    1.1 
514                START_TEST(paths)
515                {
516 rizwank    1.4 	TestCreate();
517 rizwank    1.7 	TestInfo();
518 cs130_alex 2.1 	
519 rizwank    1.2 	TestCopy();
520 cs130_alex 2.1 	
521 rizwank    1.2 	TestDestroy();
522 rizwank    1.1 }

Rizwan Kassim
Powered by
ViewCVS 0.9.2