33methods (Test )
44
55function test_expanduser(tc )
6+ import matlab .unittest .constraints .EndsWithSubstring
67import stdlib .expanduser
78tc .assumeTrue(usejava(" jvm" ), " Java required" )
89
@@ -13,7 +14,7 @@ function test_expanduser(tc)
1314
1415tc .verifyFalse(startsWith(expanduser(' ~/foo' ), " ~" ))
1516
16- tc .verifyTrue(endsWith( expanduser(' ~/foo' ), " foo" ))
17+ tc .verifyThat( expanduser(' ~/foo' ), EndsWithSubstring( " foo" ))
1718end
1819
1920
@@ -53,6 +54,7 @@ function test_which_name(tc)
5354
5455function test_is_exe_which_fullpath(tc )
5556import matlab .unittest .constraints .IsFile
57+ import matlab .unittest .constraints .EndsWithSubstring
5658tc .assumeTrue(usejava(" jvm" ), " Java required" )
5759
5860tc .verifyEmpty(stdlib .is_exe(string .empty ))
@@ -72,9 +74,9 @@ function test_is_exe_which_fullpath(tc)
7274exe = stdlib .which(p );
7375
7476if ispc
75- tc .verifyTrue(endsWith( exe , " .exe" ))
77+ tc .verifyThat( exe , EndsWithSubstring( " .exe" ))
7678else
77- tc .verifyFalse(endsWith( exe , " .exe" ))
79+ tc .verifyThat( exe , ~EndsWithSubstring( " .exe" ))
7880end
7981tc .verifyThat(exe , IsFile )
8082
0 commit comments