File: utils_io_test.c

package info (click to toggle)
otf2 3.1.1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 29,000 kB
  • sloc: ansic: 92,997; python: 16,977; cpp: 9,057; sh: 6,299; makefile: 238; awk: 54
file content (730 lines) | stat: -rw-r--r-- 17,920 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
/*
 * This file is part of the Score-P software ecosystem (http://www.score-p.org)
 *
 * Copyright (c) 2009-2012,
 * RWTH Aachen University, Germany
 *
 * Copyright (c) 2009-2012,
 * Gesellschaft fuer numerische Simulation mbH Braunschweig, Germany
 *
 * Copyright (c) 2009-2012,
 * Technische Universitaet Dresden, Germany
 *
 * Copyright (c) 2009-2012,
 * University of Oregon, Eugene, USA
 *
 * Copyright (c) 2009-2012, 2022,
 * Forschungszentrum Juelich GmbH, Germany
 *
 * Copyright (c) 2009-2012,
 * German Research School for Simulation Sciences GmbH, Juelich/Aachen, Germany
 *
 * Copyright (c) 2009-2012,
 * Technische Universitaet Muenchen, Germany
 *
 * This software may be modified and distributed under the terms of
 * a BSD-style license.  See the COPYING file in the package base
 * directory for details.
 *
 */



/**
 * @file
 *
 *
 */

#include <config.h>
#include <UTILS_IO.h>

#include <CuTest.h>
#include <stdlib.h>
#include <stdio.h>


void
io_test_1( CuTest* tc )
{
    char path[] = "";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "", path );
}

void
io_test_2( CuTest* tc )
{
    char path[] = "a";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "a", path );
}

void
io_test_3( CuTest* tc )
{
    char path[] = "abc";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "abc", path );
}

void
io_test_4( CuTest* tc )
{
    char path[] = "//";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "/", path );
}

void
io_test_5( CuTest* tc )
{
    char path[] = "foo/../bar";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "./bar", path );
}

void
io_test_6( CuTest* tc )
{
    char path[] = "/foo/../bar";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "/bar", path );
}

void
io_test_7( CuTest* tc )
{
    char path[] = "foo/bar/../../foobar";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "./foobar", path );
}

void
io_test_8( CuTest* tc )
{
    char path[] = "bar/../../foobar";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "../foobar", path );
}

void
io_test_9( CuTest* tc )
{
    char path[] = "foo/bar/../baz/../../foobar";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "./foobar", path );
}

void
io_test_10( CuTest* tc )
{
    char path[] = "//foo/..///bar///////////baz";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "/bar/baz", path );
}

void
io_test_11( CuTest* tc )
{
    char path[] = "../../foo/../bar/baz/foobar";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "../../bar/baz/foobar", path );
}

void
io_test_12( CuTest* tc )
{
    char path[] = "./../foo/../bar";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "../bar", path );
}

void
io_test_13( CuTest* tc )
{
    char path[] = "./foo/bar/../baz";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "./foo/baz", path );
}

void
io_test_14( CuTest* tc )
{
    char path[] = "./foo/bar/./././.././../baz";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "./baz", path );
}

void
io_test_15( CuTest* tc )
{
    char path[] = ".";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, ".", path );
}

void
io_test_16( CuTest* tc )
{
    char path[] = "./";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "./", path );
}

void
io_test_17( CuTest* tc )
{
    char path[] = "./.";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "", path );
}

void
io_test_18( CuTest* tc )
{
    char path[] = "./..";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "++failed++", path );
}

void
io_test_19( CuTest* tc )
{
    char path[] = "../.";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "++failed++", path );
}

void
io_test_20( CuTest* tc )
{
    char path[] = "./.././/";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "++failed++", path );
}

void
io_test_21( CuTest* tc )
{
    char path[] = "dir/..";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "", path );
}

void
io_test_22( CuTest* tc )
{
    char path[] = "dir/sub/../..";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "", path );
}

void
io_test_23( CuTest* tc )
{
    char path[] = "dir/sub/../../..";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "..", path );
}

void
io_test_24( CuTest* tc )
{
    char path[] = "dir";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "dir", path );
}

void
io_test_25( CuTest* tc )
{
    char path[] = "dir//";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "dir/", path );
}

void
io_test_26( CuTest* tc )
{
    char path[] = "./dir";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "./dir", path );
}

void
io_test_27( CuTest* tc )
{
    char path[] = "dir/.";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "dir/.", path );
}

void
io_test_28( CuTest* tc )
{
    char path[] = "dir///./";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "dir/", path );
}

void
io_test_29( CuTest* tc )
{
    char path[] = "dir//sub/..";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "./dir", path );
}

void
io_test_30( CuTest* tc )
{
    char path[] = "dir/sub/../";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "dir/", path );
}

void
io_test_31( CuTest* tc )
{
    char path[] = "dir/sub/../.";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "dir/.", path );
}

void
io_test_32( CuTest* tc )
{
    char path[] = "dir/s1/../s2/";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "dir/s2/", path );
}

void
io_test_33( CuTest* tc )
{
    char path[] = "d1/s1///s2/..//../s3/";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "d1/s3/", path );
}

void
io_test_34( CuTest* tc )
{
    char path[] = "d1/s1//../s2/../../d2";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "./d2", path );
}

void
io_test_35( CuTest* tc )
{
    char path[] = "d1/.../d2";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "d1/.../d2", path );
}

void
io_test_36( CuTest* tc )
{
    char path[] = "d1/..././../d2";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "d1/d2", path );
}

void
io_test_37( CuTest* tc )
{
    char path[] = "/";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "/", path );
}

void
io_test_38( CuTest* tc )
{
    char path[] = "//";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "/", path );
}

void
io_test_39( CuTest* tc )
{
    char path[] = "///";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "/", path );
}

void
io_test_40( CuTest* tc )
{
    char path[] = "/.";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "/.", path );
}

void
io_test_41( CuTest* tc )
{
    char path[] = "/./";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "/", path );
}

void
io_test_42( CuTest* tc )
{
    char path[] = "/./..";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "++failed++", path );
}

void
io_test_43( CuTest* tc )
{
    char path[] = "/../.";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "++failed++", path );
}

void
io_test_44( CuTest* tc )
{
    char path[] = "/./.././/";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "++failed++", path );
}

void
io_test_45( CuTest* tc )
{
    char path[] = "/dir/..";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "/", path );
}

void
io_test_46( CuTest* tc )
{
    char path[] = "/dir/sub/../..";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "/", path );
}

void
io_test_47( CuTest* tc )
{
    char path[] = "/dir/sub/../../..";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "++failed++", path );
}

void
io_test_48( CuTest* tc )
{
    char path[] = "/dir";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "/dir", path );
}

void
io_test_49( CuTest* tc )
{
    char path[] = "/dir//";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "/dir/", path );
}

void
io_test_50( CuTest* tc )
{
    char path[] = "/./dir";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "/dir", path );
}

void
io_test_51( CuTest* tc )
{
    char path[] = "/dir/.";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "/dir/.", path );
}

void
io_test_52( CuTest* tc )
{
    char path[] = "/dir///./";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "/dir/", path );
}

void
io_test_53( CuTest* tc )
{
    char path[] = "/dir//sub/..";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "/dir", path );
}

void
io_test_54( CuTest* tc )
{
    char path[] = "/dir/sub/../";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "/dir/", path );
}

void
io_test_55( CuTest* tc )
{
    char path[] = "//dir/sub/../.";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "/dir/.", path );
}

void
io_test_56( CuTest* tc )
{
    char path[] = "/dir/s1/../s2/";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "/dir/s2/", path );
}

void
io_test_57( CuTest* tc )
{
    char path[] = "/d1/s1///s2/..//../s3/";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "/d1/s3/", path );
}

void
io_test_58( CuTest* tc )
{
    char path[] = "/d1/s1//../s2/../../d2";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "/d2", path );
}

void
io_test_59( CuTest* tc )
{
    char path[] = "/d1/.../d2";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "/d1/.../d2", path );
}

void
io_test_60( CuTest* tc )
{
    char path[] = "/d1/..././../d2";
    UTILS_IO_SimplifyPath( path );
    CuAssertStrEquals( tc, "/d1/d2", path );
}


void
io_test_61( CuTest* tc )
{
    char* joined_path = UTILS_IO_JoinPath( 0 );
    CuAssertPtrNotNull( tc, joined_path );
    CuAssertStrEquals( tc, "", joined_path );
    free( joined_path );
}


void
io_test_62( CuTest* tc )
{
    char* joined_path = UTILS_IO_JoinPath( 1, "" );
    CuAssertPtrNotNull( tc, joined_path );
    CuAssertStrEquals( tc, "", joined_path );
    free( joined_path );
}


void
io_test_63( CuTest* tc )
{
    char* joined_path = UTILS_IO_JoinPath( 2, "", "" );
    CuAssertPtrNotNull( tc, joined_path );
    CuAssertStrEquals( tc, "", joined_path );
    free( joined_path );
}


void
io_test_64( CuTest* tc )
{
    char* joined_path = UTILS_IO_JoinPath( 1, NULL );
    CuAssertPtrEquals( tc, NULL, joined_path );
}


void
io_test_65( CuTest* tc )
{
    char* joined_path = UTILS_IO_JoinPath( 2, "/", "/" );
    CuAssertPtrNotNull( tc, joined_path );
    CuAssertStrEquals( tc, "/", joined_path );
    free( joined_path );
}


void
io_test_66( CuTest* tc )
{
    char* joined_path = UTILS_IO_JoinPath( 3, "a", "b", "c" );
    CuAssertPtrNotNull( tc, joined_path );
    CuAssertStrEquals( tc, "a/b/c", joined_path );
    free( joined_path );
}


void
io_test_67( CuTest* tc )
{
    char* joined_path = UTILS_IO_JoinPath( 3, "a", "b/c", "d" );
    CuAssertPtrNotNull( tc, joined_path );
    CuAssertStrEquals( tc, "a/b/c/d", joined_path );
    free( joined_path );
}


void
io_test_68( CuTest* tc )
{
    char* joined_path = UTILS_IO_JoinPath( 3, "a", "/b/c", "d" );
    CuAssertPtrNotNull( tc, joined_path );
    CuAssertStrEquals( tc, "/b/c/d", joined_path );
    free( joined_path );
}


void
io_test_69( CuTest* tc )
{
    char* joined_path = UTILS_IO_JoinPath( 3, "a", "b/c", "/d" );
    CuAssertPtrNotNull( tc, joined_path );
    CuAssertStrEquals( tc, "/d", joined_path );
    free( joined_path );
}


void
io_test_70( CuTest* tc )
{
    char* joined_path = UTILS_IO_JoinPath( 3, "a", "/b/c", "/d" );
    CuAssertPtrNotNull( tc, joined_path );
    CuAssertStrEquals( tc, "/d", joined_path );
    free( joined_path );
}


void
io_test_71( CuTest* tc )
{
    char* joined_path = UTILS_IO_JoinPath( 2, "a", "" );
    CuAssertPtrNotNull( tc, joined_path );
    CuAssertStrEquals( tc, "a", joined_path );
    free( joined_path );
}


int
main()
{
    CuUseColors();
    CuString* output = CuStringNew();
    CuSuite*  suite  = CuSuiteNew( "IO tools" );

    SUITE_ADD_TEST_NAME( suite, io_test_1, "simplify path \"\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_2, "simplify path \"a\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_3, "simplify path \"abc\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_4, "simplify path \"//\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_5, "simplify path \"foo/../bar\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_6, "simplify path \"/foo/../bar\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_7, "simplify path \"foo/bar/../../foobar\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_8, "simplify path \"bar/../../foobar\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_9, "simplify path \"foo/bar/../baz/../../foobar\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_10, "simplify path \"//foo/..///bar///////////baz\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_11, "simplify path \"../../foo/../bar/baz/foobar\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_12, "simplify path \"./../foo/../bar\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_13, "simplify path \"./foo/bar/../baz\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_14, "simplify path \"./foo/bar/./././.././../baz\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_15, "simplify path \".\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_16, "simplify path \"./\"" );
    //SUITE_ADD_TEST_NAME( suite, io_test_17, "simplify path \"./.\"" );
    //SUITE_ADD_TEST_NAME( suite, io_test_18, "simplify path \"./..\"" );
    //SUITE_ADD_TEST_NAME( suite, io_test_19, "simplify path \"../.\"" );
    //SUITE_ADD_TEST_NAME( suite, io_test_20, "simplify path \"./.././/\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_21, "simplify path \"dir/..\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_22, "simplify path \"dir/sub/../..\"" );
    //SUITE_ADD_TEST_NAME( suite, io_test_23, "simplify path \"dir/sub/../../..\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_24, "simplify path \"dir\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_25, "simplify path \"dir//\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_26, "simplify path \"./dir\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_27, "simplify path \"dir/.\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_28, "simplify path \"dir///./\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_29, "simplify path \"dir//sub/..\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_30, "simplify path \"dir/sub/../\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_31, "simplify path \"dir/sub/../.\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_32, "simplify path \"dir/s1/../s2/\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_33, "simplify path \"d1/s1///s2/..//../s3/\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_34, "simplify path \"d1/s1//../s2/../../d2\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_35, "simplify path \"d1/.../d2\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_36, "simplify path \"d1/..././../d2\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_37, "simplify path \"/\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_38, "simplify path \"//\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_39, "simplify path \"///\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_40, "simplify path \"/.\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_41, "simplify path \"/./\"" );
    //SUITE_ADD_TEST_NAME( suite, io_test_42, "simplify path \"/./..\"" );
    //SUITE_ADD_TEST_NAME( suite, io_test_43, "simplify path \"/../.\"" );
    //SUITE_ADD_TEST_NAME( suite, io_test_44, "simplify path \"/./.././/\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_45, "simplify path \"/dir/..\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_46, "simplify path \"/dir/sub/../..\"" );
    //SUITE_ADD_TEST_NAME( suite, io_test_47, "simplify path \"/dir/sub/../../..\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_48, "simplify path \"/dir\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_49, "simplify path \"/dir//\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_50, "simplify path \"/./dir\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_51, "simplify path \"/dir/.\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_52, "simplify path \"/dir///./\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_53, "simplify path \"/dir//sub/..\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_54, "simplify path \"/dir/sub/../\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_55, "simplify path \"//dir/sub/../.\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_56, "simplify path \"/dir/s1/../s2/\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_57, "simplify path \"/d1/s1///s2/..//../s3/\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_58, "simplify path \"/d1/s1//../s2/../../d2\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_59, "simplify path \"/d1/.../d2\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_60, "simplify path \"/d1/..././../d2\"" );

    SUITE_ADD_TEST_NAME( suite, io_test_61, "join path" );
    SUITE_ADD_TEST_NAME( suite, io_test_62, "join path \"\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_63, "join path \"\", \"\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_64, "join path NULL" );
    SUITE_ADD_TEST_NAME( suite, io_test_65, "join path \"/\", \"/\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_66, "join path \"a\", \"b\", \"c\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_67, "join path \"a\", \"b/c\", \"d\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_68, "join path \"a\", \"/b/c\", \"d\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_69, "join path \"a\", \"b/c\", \"/d\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_70, "join path \"a\", \"/b/c\", \"/d\"" );
    SUITE_ADD_TEST_NAME( suite, io_test_71, "join path \"a\", \"\"" );


    CuSuiteRun( suite );
    CuSuiteSummary( suite, output );

    int failCount = suite->failCount;
    if ( failCount )
    {
        printf( "%s", output->buffer );
    }

    CuSuiteFree( suite );
    CuStringFree( output );

    return failCount ? EXIT_FAILURE : EXIT_SUCCESS;
}