* [#16620](https://bugzilla.scilab.org/16620): `derivat` had no reciprocal `polyint` polynomial integration function.
* [#16622](https://bugzilla.scilab.org/16622): `inv` could no longer be overloaded for hypermatrices of decimal or complex numbers.
* [#16623](https://bugzilla.scilab.org/16623): `rand(2,2,2)^2` yielded a wrong result instead of trying to call the `%s_p_s` overload for input hypermatrices.
+* [#16624](https://bugzilla.scilab.org/16624): `fullfile` badly handled any forced final file separator when building a directory's path.
* [#16629](https://bugzilla.scilab.org/16629): `interp1`'s documentation did not tell the spline edges conditions ; extrapolation modes were poorly explained. ; the description of the result's size was completely wrong ; x as an option was not documented. A wrong extrapolation value could silently return a wrong result. There was some dead code like `if varargin(5)==%nan`. A bugged error message yielded its own error. When x is implicit, the argument index in error messages could be wrong. `periodic` and `edgevalue` extrapolation modes were not available. `linear` extrapolation was not available for splines. When `xp` is an hypermatrix with `size(xp,1)==1`, the size of the result was irregular/wrong.
* [#16644](https://bugzilla.scilab.org/16644): `input("message:")` yielded a wrong error message about `mprintf` in case of non-interpretable input.
* [#16654](https://bugzilla.scilab.org/16654): `interp` was leaking memory.
+++ /dev/null
-// =============================================================================
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2012 - DIGITEO - Allan CORNET
-//
-// This file is distributed under the same license as the Scilab package.
-// =============================================================================
-//
-// <-- CLI SHELL MODE -->
-//
-// =============================================================================
-// Tests fullfile
-// =============================================================================
-//
-assert_checkequal(fullfile([]), []);
-assert_checkequal(fullfile([],[]), []);
-assert_checkequal(fullfile([],[],[]), []);
-msgerr = msprintf(gettext("%s: Wrong number of input argument(s): At least %d expected.\n"), "fullfile", 1);
-assert_checkerror ("fullfile()" , msgerr);
-REF = SCI + '/etc/scilab.start';
-r = fullfile(SCI, '/etc/', 'scilab.start');
-if getos() <> "Windows" then
- REF1 = "/home/scilab/macros/util/fullfile.sci";
- REF2 = "/cygdrive/C/scilab/macros/util/fullfile.sci";
-else
- REF1 = "\home\scilab\macros\util\fullfile.sci";
- REF2 = "C:\scilab\macros\util\fullfile.sci";
-end
-r1 = fullfile("/home/", "\scilab", "macros", "\util", "fullfile.sci");
-r2 = fullfile("C:", "\scilab", "macros", "\util", "fullfile.sci");
-assert_checkequal(r1, REF1);
-assert_checkequal(r2, REF2);
-msgerr = msprintf(gettext("%s: Wrong type for input argument #%d: a string expected.\n"), "fullfile", 2);
-assert_checkerror ("r = fullfile(SCI, 3, ''scilab.start'')", msgerr);
-if getos() <> "Windows" then
- REF = ['/home/scilab/macros/util/fullfile.sci';
- '/home/scilab/macros/util/toto.sci'];
-else
- REF = ['\home\scilab\macros\util\fullfile.sci';
- '\home\scilab\macros\util\toto.sci'];
-end
-r = fullfile("/home/","\scilab","macros","\util", ["fullfile.sci"; "toto.sci"]);
-assert_checkequal(r, REF);
-// =============================================================================
// =============================================================================
//
// <-- CLI SHELL MODE -->
+// <-- NO CHECK REF -->
//
// =============================================================================
// Tests fullfile
r = fullfile("/home/","\scilab","macros","\util", ["fullfile.sci"; "toto.sci"]);
assert_checkequal(r, REF);
-// =============================================================================
+// Final filesep: http://bugzilla.scilab.org/16624
+// -------------
+assert_checkequal(part(fullfile(TMPDIR, "mylib"),$-1:$), "ib");
+assert_checkequal(part(fullfile(TMPDIR, "mylib/"),$-1:$), "b"+filesep());
+assert_checkequal(part(fullfile(TMPDIR, "mylib\"),$-1:$), "b"+filesep());
+r = fullfile(TMPDIR, ["mylib" "mylib/" "mylib\"]);
+assert_checkequal(part(r,$-1:$), ["ib" ["b" "b"]+filesep()]);
+r = fullfile(TMPDIR, ["mylib" "mylib/" "mylib\"]');
+assert_checkequal(part(r,$-1:$), ["ib" ["b" "b"]+filesep()]');