Skip to content

Commit 4c68b01

Browse files
committed
test: add path rather than special function
1 parent 733dbf1 commit 4c68b01

File tree

6 files changed

+12
-15
lines changed

6 files changed

+12
-15
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,24 @@ runs:
77
steps:
88

99
- name: Check task
10-
if: ${{ matrix.release >= 'R2024b' || matrix.release == 'latest' || matrix.release == 'latest-including-prerelease' }}
10+
if: ${{ matrix.release >= 'R2024b' || startsWith(matrix.release, 'latest') }}
1111
uses: matlab-actions/run-build@v2
1212
with:
1313
startup-options: ${{ matrix.startup-options }}
1414
tasks: check
1515

1616
- name: Test task
17-
if: ${{ matrix.release >= 'R2022b' || matrix.release == 'latest' || matrix.release == 'latest-including-prerelease' }}
17+
if: ${{ matrix.release >= 'R2022b' || startsWith(matrix.release, 'latest') }}
1818
uses: matlab-actions/run-build@v2
1919
with:
2020
startup-options: ${{ matrix.startup-options }}
2121
tasks: test
2222

2323

2424
- name: Run tests (manual)
25-
if: ${{ matrix.release < 'R2022b' && matrix.release != 'latest' && matrix.release != 'latest-including-prerelease' }}
25+
if: ${{ matrix.release < 'R2022b' && !startsWith(matrix.release, 'latest') }}
2626
uses: matlab-actions/run-tests@v2
2727
with:
28+
source-folder: ${{ github.workspace }}
2829
select-by-folder: test
30+
strict: true

buildfile.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ function checkTask(~)
1010
end
1111

1212
function testTask(~)
13-
r = runtests(IncludeSubfolders=true, strict=true, UseParallel=true);
13+
addpath(fileparts(mfilename("fullpath")))
14+
15+
r = runtests(IncludeSubfolders=true, strict=true, UseParallel=true, OutputDetail="Detailed");
1416

1517
assert(~isempty(r), "No tests were run")
1618
assertSuccess(r)

test/TestCanonical.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
properties (TestParameter)
44
p_canonical = ...
55
{{"", ""}, {"not-exist", "not-exist"}, {"a/../b", "b"}, ...
6-
{"~", test_homedir()}, {"~/", test_homedir()}, ...
7-
{"~/..", stdlib.parent(test_homedir())}, ...f
6+
{"~", stdlib.homedir()}, {"~/", stdlib.homedir()}, ...
7+
{"~/..", stdlib.parent(stdlib.homedir())}, ...f
88
{mfilename("fullpath") + ".m/..", stdlib.parent(mfilename("fullpath"))}};
99
end
1010

test/TestFileImpure.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
p_is_writable = {{pwd(), true}, {"not-exists", false}};
88

9-
p_expand = {{"", ""}, {"~abc", "~abc"}, {"~", test_homedir()}, {"~/c", test_homedir() + "/c"}, {'~/////c', test_homedir() + "/c"}};
9+
p_expand = {{"", ""}, {"~abc", "~abc"}, {"~", stdlib.homedir()}, {"~/c", stdlib.homedir() + "/c"}, {'~/////c', stdlib.homedir() + "/c"}};
1010

1111
p_same = {...
1212
{"","", false}, ...

test/TestFilePure.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
{"a/b", "..", "a/b/.."}, ...
2929
{"a/b", "c/d", "a/b/c/d"}, ...
3030
{"ab/cd", "/ef", "/ef"}, ...
31-
{test_homedir(), "", test_homedir()}, ...
31+
{stdlib.homedir(), "", stdlib.homedir()}, ...
3232
{matlabroot, "bin", stdlib.posix(matlabroot + "/bin")}
3333
}
3434

test/private/test_homedir.m

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)