Skip to content

Commit 884a8c0

Browse files
committed
test_nomex.m compatible with R2020b
1 parent 3fc87eb commit 884a8c0

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

.github/workflows/composite-nomex/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ runs:
4444
if: ${{ matrix.release < 'R2023b' }}
4545
uses: matlab-actions/run-command@v2
4646
with:
47-
command: test_nomex
48-
startup-options: -sd ${{ github.workspace }}/test -logfile ${{ matrix.release }}-${{ runner.os }}-test.log
47+
command: run('test/test_nomex.m')
48+
startup-options: -logfile ${{ matrix.release }}-${{ runner.os }}-test.log
4949
# test/test_nomex.m adds path internally
5050

5151
- name: upload logfile

Readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Matlab R2019b is the minimum required due to use of
1414
[arguments](https://www.mathworks.com/help/matlab/ref/arguments.html)
1515
syntax.
1616
URLs (e.g. https://, s3:// and similar) are treated as not existing.
17-
The self-tests require at least Matlab R2021b and can be run from the matlab-stdlib/ directory.
17+
The self-tests require at least Matlab R2021a and can be run from the matlab-stdlib/ directory.
1818

1919
```matlab
2020
%% Matlab >= R2023a

test/test_nomex.m

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
11
function test_nomex()
2+
import matlab.unittest.TestRunner
23
import matlab.unittest.selectors.HasTag
34

4-
cwd = fileparts(mfilename('fullpath'));
5+
sel = ~HasTag("exe") & ~HasTag("mex");
56

7+
cwd = fileparts(mfilename('fullpath'));
68
root = fileparts(cwd);
79
addpath(root)
810

911
if isMATLABReleaseOlderThan('R2022b')
1012
suite = testsuite(cwd);
1113
else
12-
suite = testsuite(cwd, InvalidFileFoundAction="error");
14+
suite = testsuite(cwd, 'InvalidFileFoundAction', "error");
1315
end
1416

15-
sel = ~HasTag("exe") & ~HasTag("mex");
16-
1717
suite = suite.selectIf(sel);
1818

19-
r = run(testrunner(), suite);
19+
runner = TestRunner.withTextOutput;
20+
r = runner.run(suite);
2021

2122
assert(~isempty(r), "No tests were run")
2223
assertSuccess(r)
24+
2325
end

0 commit comments

Comments
 (0)