Skip to content

Commit 878038f

Browse files
committed
test: is_interactive
test: get_shell
1 parent 948eb49 commit 878038f

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

test/TestSys.m

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
classdef TestSys < matlab.unittest.TestCase
22

3+
properties
4+
CI = getenv("CI") == "true" || getenv("GITHUB_ACTIONS") == "true"
5+
end
6+
37
properties (TestParameter)
4-
fun = {stdlib.isoctave, stdlib.isinteractive, stdlib.has_dotnet, ...
8+
fun = {stdlib.isoctave, stdlib.has_dotnet, ...
59
stdlib.has_java, stdlib.has_python}
610
end
711

@@ -16,6 +20,15 @@ function test_is_cygwin(tc)
1620
tc.verifyFalse(stdlib.is_cygwin())
1721
end
1822

23+
function test_get_shell(tc)
24+
tc.assumeFalse(tc.CI, "get_shell is not tested in CI due to platform differences")
25+
tc.verifyNotEmpty(stdlib.get_shell())
26+
end
27+
28+
function test_is_interactive(tc)
29+
tc.verifyNotEqual(stdlib.is_interactive(), tc.CI)
30+
end
31+
1932
function test_is_rosetta(tc)
2033
if ismac()
2134
tc.verifyClass(stdlib.is_rosetta(), 'logical')

0 commit comments

Comments
 (0)