1111}
1212% on CI matlabroot can be writable!
1313isr_method = {' java' , ' native' , ' legacy' }
14- isw_fun = {@stdlib.is_writable, @stdlib. java.is_writable, @stdlib. native.is_writable, @stdlib.native.is_writable_legacy }
14+ isw_method = {' java' , ' native' , ' legacy ' }
1515end
1616
1717methods (TestClassSetup )
@@ -37,19 +37,21 @@ function test_is_readable(tc, Ps, isr_method)
3737end
3838
3939
40- function test_is_writable(tc , Ps , isw_fun )
41- is_capable(tc , isw_fun )
40+ function test_is_writable(tc , Ps , isw_method )
41+ is_capable(tc , str2func( " stdlib. " + isw_method + " .is_writable " ) )
4242
43- ok = isw_fun (Ps{1 });
43+ ok = stdlib .is_writable (Ps{1 }, isw_method );
4444tc .verifyEqual(ok , Ps{2 }, Ps{1 })
4545end
4646
47- function test_is_writable_dir(tc )
47+ function test_is_writable_dir(tc , isw_method )
48+ is_capable(tc , str2func(" stdlib." + isw_method + " .is_writable" ))
49+
4850tc .assumeFalse(isMATLABReleaseOlderThan(' R2022a' ))
4951
5052td = tc .createTemporaryFolder();
5153
52- tc .verifyTrue(stdlib .is_writable(td ))
54+ tc .verifyTrue(stdlib .is_writable(td , isw_method ))
5355end
5456
5557end
0 commit comments