Skip to content

Commit bbfaf14

Browse files
committed
canonical: don't coerce output
1 parent 7ad0216 commit bbfaf14

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

+stdlib/canonical.m

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@
4646
c = stdlib.normalize(e);
4747
end
4848

49-
c = string(stdlib.posix(c));
50-
5149
end
5250

5351
%!assert(canonical("", 1), "")

+stdlib/normalize.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
if isempty(j)
4444
n = "";
4545
else
46-
n = n{1}(1:j(end)-1);
46+
n = string(n{1}(1:j(end)-1));
4747
end
4848
end
4949
elseif all(parts(i) ~= [".", ""])

test/TestCanonical.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
{"", ""}, ...
66
{"not-exist", "not-exist"}, ...
77
{"a/../b", "b"}, ...
8-
{'~', string(stdlib.homedir())}, ...
8+
{'~', stdlib.homedir()}, ...
99
{"~", string(stdlib.homedir())}, ...
10-
{'~/', string(stdlib.homedir())}, ...
10+
{'~/', stdlib.homedir()}, ...
1111
{"~/", string(stdlib.homedir())}, ...
1212
{"~/..", string(stdlib.parent(stdlib.homedir()))}, ...
1313
{mfilename("fullpath") + ".m/..", string(stdlib.parent(mfilename("fullpath")))}, ...

0 commit comments

Comments
 (0)