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"); |
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 |
//--------------------------- |
//--------------------------- |