@@ -16,15 +16,21 @@ function pkg_path(tc)
1616methods (Test , TestTags = " pure" )
1717
1818function test_root(tc , p )
19- tc .verifyEqual(stdlib .root(p{1 }), p{2 })
19+ r = stdlib .root(p{1 });
20+ tc .assertClass(r , ' string' )
21+ tc .verifyEqual(r , p{2 })
2022end
2123
2224function test_root_dir(tc , rd )
23- tc .verifyEqual(stdlib .root_dir(rd{1 }), rd{2 }, " root_dir(" + rd{1 } + " )" )
25+ r = stdlib .root_dir(rd{1 });
26+ tc .assertClass(r , ' string' )
27+ tc .verifyEqual(r , rd{2 }, " root_dir(" + rd{1 } + " )" )
2428end
2529
2630function test_root_name(tc , rn )
27- tc .verifyEqual(stdlib .root_name(rn{1 }), rn{2 })
31+ r = stdlib .root_name(rn{1 });
32+ tc .assertClass(r , ' string' )
33+ tc .verifyEqual(r , rn{2 })
2834end
2935
3036end
@@ -38,15 +44,15 @@ function test_root_name(tc, rn)
3844{" a/b" , " " }, ...
3945{" ./a/b" , " " }, ...
4046{" /etc" , " /" }, ...
41- {' /etc' , ' / ' }, ...
47+ {' /etc' , " / " }, ...
4248{" c:" , " " }, ...
4349{" c:/etc" , " " }, ...
44- {' c:\etc' , ' ' }};
50+ {' c:\etc' , " " }};
4551
4652if ispc()
4753p{6 }{2 } = " c:" ;
4854p{7 }{2 } = " c:/" ;
49- p{8 }{2 } = ' c:\' ;
55+ p{8 }{2 } = " c:\" ;
5056end
5157
5258end
@@ -57,12 +63,12 @@ function test_root_name(tc, rn)
5763rn = init_root();
5864
5965rn{4 }{2 } = " " ;
60- rn{5 }{2 } = ' ' ;
66+ rn{5 }{2 } = " " ;
6167
6268if ispc()
6369rn{6 }{2 } = " c:" ;
6470rn{7 }{2 } = " c:" ;
65- rn{8 }{2 } = ' c: ' ;
71+ rn{8 }{2 } = " c: " ;
6672end
6773
6874end
@@ -75,7 +81,7 @@ function test_root_name(tc, rn)
7581if ispc()
7682rd{6 }{2 } = " " ;
7783rd{7 }{2 } = " /" ;
78- rd{8 }{2 } = ' \ ' ;
84+ rd{8 }{2 } = " \ " ;
7985end
8086
8187end
0 commit comments