1616{" a/b/c.txt" , " c" }, {" a/b/c.txt.gz" , " c.txt" }, ...
1717{" a/b/.c" , " .c" }}
1818
19- p_join = {{" " , " " , " " }, ...
20- {" a" , " " , " a" }, ...
21- {" " , " a" , " a" }, ...
22- {" a/b/" , " c/" , " a/b/c" }, ...
23- {" /" , " " , " /" }, ...
24- {" " , " /" , " /" }, ...
25- {" a" , " b//" , " a/b" }, ...
26- {" a//" , " b//" , " a/b" }, ...
27- {" a/b/../" , " c/d/../" , " a/b/../c/d/.." }, ...
28- {" a/b" , " .." , " a/b/.." }, ...
29- {" a/b" , " c/d" , " a/b/c/d" }, ...
30- {" ab/cd" , " /ef" , " /ef" }, ...
31- {stdlib .homedir(), " " , stdlib .homedir()}, ...
32- {matlabroot , " bin" , stdlib .posix(matlabroot + " /bin" )}
33- }
34-
3519p_suffix = {{" " , " " }, {" /a/b/c" , " " }, {" /a/b/c/" , " " }, {" a/b/c.txt" , " .txt" }, {" a/b/c.txt.gz" , " .gz" }, {" .stat" , " .stat" }, {" .stat.txt" , " .txt" }}
3620
37- p_with_suffix = {{" foo.h5" , " .nc" , " foo.nc" }, {" c" , " " , " c" }, {" c.nc" , " " , " c" }, ...
38- {" " , " .nc" , " .nc" }, {" a//b///c///" , " .h5" , " a/b/c/.h5" }, ...
39- {" a/b/.h5" , " .nc" , " a/b/.h5.nc" }, {" a/b" , " .nc" , " a/b.nc" }};
40-
41- p_norm = {
42- {" " , " ." }, ...
43- {" a/.." , " ." }, ...
44- {" //a/b/" , " /a/b" }, ...
45- {" /a/b/" , " /a/b" }, ...
46- {" a/b/" , " a/b" }, ...
47- {" a/../c" , " c" }, ...
48- {" a/b/../c" , " a/c" }, ...
49- {" a/b/../../c" , " c" }, ...
50- {" a/b/../../c/.." , " ." }, ...
51- {" a/b/../../c/../.." , " .." }, ...
52- {" a////b" , " a/b" }, ...
53- {" .a" , " .a" }, ...
54- {" ..a" , " ..a" }, ...
55- {" a." , " a." }, ...
56- {" a.." , " a.." }, ...
57- {" ./a/." , " a" }, ...
58- {" ../a" , " ../a" }
59- };
60-
6121p_root
6222p_root_name
6323end
@@ -112,11 +72,6 @@ function test_posix(tc)
11272end
11373end
11474
115-
116- function test_join(tc , p_join )
117- tc .verifyEqual(stdlib .join(p_join{1 }, p_join{2 }), p_join{3 })
118- end
119-
12075function test_filename(tc , p_filename )
12176tc .verifyEqual(stdlib .filename(p_filename{1 }), p_filename{2 })
12277end
@@ -130,29 +85,14 @@ function test_stem(tc, p_stem)
13085tc .verifyEqual(stdlib .stem(p_stem{1 }), p_stem{2 })
13186end
13287
133-
13488function test_is_absolute(tc , p_is_absolute )
13589ok = stdlib .is_absolute(p_is_absolute{1 }, stdlib .has_java());
13690tc .verifyEqual(ok , p_is_absolute{2 }, p_is_absolute{1 })
13791end
13892
139-
140- function test_normalize(tc , p_norm )
141-
142- tc .verifyEqual(stdlib .normalize(p_norm{1 }), p_norm{2 })
143-
144- end
145-
146-
14793function test_root(tc , p_root )
14894tc .verifyEqual(stdlib .root(p_root{1 }), p_root{2 })
14995end
15096
151-
152- function test_with_suffix(tc , p_with_suffix )
153- tc .verifyEqual(stdlib .with_suffix(p_with_suffix{1 }, p_with_suffix{2 }), p_with_suffix{3 })
154- end
155-
156-
15797end
15898end
0 commit comments