1111
1212properties
1313root = fileparts(fileparts(mfilename(' fullpath' )))
14+ wd
1415end
1516
1617methods (TestClassSetup )
1718function test_dirs(tc )
18- tc .applyFixture(matlab .unittest .fixtures .WorkingFolderFixture())
19+ fx = matlab .unittest .fixtures .WorkingFolderFixture();
20+ tc.wd = fx .Folder ;
21+ tc .applyFixture(fx )
1922end
2023end
2124
@@ -24,7 +27,7 @@ function test_backend(tc)
2427import matlab .unittest .constraints .IsSubsetOf
2528
2629
27- readme = tc .root + " / Readme.md" ;
30+ readme = fullfile( tc .root , ' Readme.md' ) ;
2831if stdlib .matlabOlderThan(' R2018a' )
2932 tc .assertTrue(isfile(readme ))
3033else
@@ -36,9 +39,11 @@ function test_backend(tc)
3639tc .verifyGreaterThanOrEqual(i , 0 )
3740% some CI systems report 0
3841
39- [i , b ] = stdlib .create_symlink(readme , " Readme.lnk" );
42+ % best to use full path to avoid issues on HPC etc.
43+ sym_fn = fullfile(tc .wd , ' Readme.lnk' );
44+ [i , b ] = stdlib .create_symlink(readme , sym_fn );
4045tc .assertThat(b , IsSubsetOf(stdlib .Backend(' create_symlink' ).backends))
41- tc .verifyTrue(i , " backend " + b + " should have been available in Backend.backends() " )
46+ tc .verifyTrue(i , " could not create_symlink " + sym_fn )
4247
4348[i , b ] = stdlib .device(' .' );
4449tc .assertThat(b , IsSubsetOf(stdlib .Backend(' device' ).backends))
0 commit comments