1- classdef TestFilename < matlab .unittest .TestCase
1+ classdef (TestTags = {' R2019b' , ' pure' }) ...
2+ TestFilename < matlab .unittest .TestCase
23
34properties (TestParameter )
45p = init_p()
5- e = {' /a/b/c/' , " a/b/c/" }
66backend = init_backend()
77end
88
@@ -12,21 +12,16 @@ function test_dirs(tc)
1212end
1313end
1414
15- methods (Test , TestTags = [ " R2019b " , " pure "] )
15+ methods (Test )
1616
1717function test_filename(tc , p , backend )
1818fn = stdlib .filename(p{1 }, backend );
1919tc .verifyEqual(fn , p{2 })
2020end
2121
22- function test_filename_empty(tc , e , backend )
23- fn = stdlib .filename(e , backend );
24- tc .verifyEqual(strlength(fn ), 0 )
25- end
26-
2722function test_filename_array(tc , backend )
28- in = [" " , " a" , " a/b/c" , " a/b/c.txt" , " a/b/.hidden" , " a/b/c/" ];
29- exp = [" " , " a" , " c" , " c.txt" , " .hidden" , " " ];
23+ in = [" " , " a" , " a/b/c" , " a/b/" , " a/b/ c.txt" , " a/b/.hidden" , " a/b/c/" ];
24+ exp = [" " , " a" , " c" , " " , " c.txt" , " .hidden" , " " ];
3025out = stdlib .filename(in , backend );
3126tc .verifyEqual(out , exp )
3227end
0 commit comments