/[ascend]/trunk/ascend/general/test/test_ospath.c
ViewVC logotype

Diff of /trunk/ascend/general/test/test_ospath.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2698 by jpye, Wed Dec 12 06:04:23 2012 UTC revision 2699 by jpye, Thu Apr 11 05:13:03 2013 UTC
# Line 271  static void test_up(void){ Line 271  static void test_up(void){
271    
272  static void test_concat(void){  static void test_concat(void){
273    
274      struct FilePath *fp1, *fp2, *fp3, *fp4;      struct FilePath *fp1, *fp2, *fp3, *fp4, *fp5;
275    
276      fp1 = ospath_new("/home");      fp1 = ospath_new("/home");
277      fp2 = ospath_new("john");      fp2 = ospath_new("john");
# Line 294  static void test_concat(void){ Line 294  static void test_concat(void){
294      M("Passed 'ospath_concat' test\n");      M("Passed 'ospath_concat' test\n");
295    
296      ospath_free(fp1); ospath_free(fp2); ospath_free(fp3); ospath_free(fp4);      ospath_free(fp1); ospath_free(fp2); ospath_free(fp3); ospath_free(fp4);
297    
298        M("TESTING CONCAT WITH ..");
299    
300        fp1 = ospath_new_from_posix("/usr/bin/less");
301        fp2 = ospath_getdir(fp1);
302        fp3 = ospath_new_noclean("../share/icons/pkgconfig");
303        fp4 = ospath_concat(fp2,fp3);
304        ospath_cleanup(fp4);
305    
306        fp5 = ospath_new_from_posix("/usr/share/icons/pkgconfig");
307    
308    #if 0
309        M("FP4:");
310        ospath_fwrite(fp4,stderr);
311        M("\nFP5:");
312        ospath_fwrite(fp5,stderr);
313        M("");
314    #endif
315        
316        CU_TEST(ospath_cmp(fp4,fp5)==0);
317    
318        ospath_free(fp1); ospath_free(fp2); ospath_free(fp3); ospath_free(fp4); ospath_free(fp5);
319    
320      MEMUSED(0);      MEMUSED(0);
321  }  }
322      //---------------------------      //---------------------------

Legend:
Removed from v.2698  
changed lines
  Added in v.2699

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22