summaryrefslogtreecommitdiffstats
path: root/scilab/modules
diff options
context:
space:
mode:
authorSamuel GOUGEON <sgougeon@free.fr>2021-04-22 19:41:08 +0200
committerClément David <clement.david@esi-group.com>2021-04-27 12:54:14 +0200
commit5c4416e8a5bd73bad63e902d09646b768305988d (patch)
tree2593eb7655386b50785ac1e4e2827e5dd1312194 /scilab/modules
parentab128135c7b6f67fb574205f36fc9c13a5d87b88 (diff)
downloadscilab-5c4416e8a5bd73bad63e902d09646b768305988d.zip
scilab-5c4416e8a5bd73bad63e902d09646b768305988d.tar.gz
* Bug 16679 fixed: get_function_path('acosh') yielded an error
http://bugzilla.scilab.org/16679 Change-Id: Ife5e2e8bffbe19a406112171ce73ea2639a1114f
Diffstat (limited to 'scilab/modules')
-rw-r--r--scilab/modules/functions/macros/get_function_path.sci2
-rw-r--r--scilab/modules/functions/tests/nonreg_tests/bug_16679.tst26
2 files changed, 27 insertions, 1 deletions
diff --git a/scilab/modules/functions/macros/get_function_path.sci b/scilab/modules/functions/macros/get_function_path.sci
index 447e096..7b0ee2a 100644
--- a/scilab/modules/functions/macros/get_function_path.sci
+++ b/scilab/modules/functions/macros/get_function_path.sci
@@ -31,7 +31,7 @@ function path = get_function_path(name)
31 31
32 libname = whereis(name); 32 libname = whereis(name);
33 33
34 if libname <> [] then 34 if libname <> [] & libname <> "script" & type(evstr(name))==13 then
35 for i = 1:size(libname,"*") 35 for i = 1:size(libname,"*")
36 [funcnames, pathlib] = libraryinfo(libname(i)); 36 [funcnames, pathlib] = libraryinfo(libname(i));
37 path = [path ; fullfile(pathlib, name + ".sci")]; 37 path = [path ; fullfile(pathlib, name + ".sci")];
diff --git a/scilab/modules/functions/tests/nonreg_tests/bug_16679.tst b/scilab/modules/functions/tests/nonreg_tests/bug_16679.tst
new file mode 100644
index 0000000..c3515db
--- /dev/null
+++ b/scilab/modules/functions/tests/nonreg_tests/bug_16679.tst
@@ -0,0 +1,26 @@
1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2021 - Samuel GOUGEON
4//
5// This file is distributed under the same license as the Scilab package.
6// =============================================================================
7//
8// <-- CLI SHELL MODE -->
9// <-- NO CHECK REF -->
10// <-- Non-regression test for bug 16679 -->
11//
12// <-- Bugzilla URL -->
13// https://bugzilla.scilab.org/16679
14//
15// <-- Short Description -->
16// get_function_path("acosh") yielded an error (Scilab 6.0.0 regression)
17
18// builtin
19assert_checkequal(get_function_path("sin"), []);
20// user macro
21function test(), endfunction
22assert_checkequal(get_function_path("test"), []);
23// macro in library
24ref = pathconvert("WSCI\modules\elementary_functions\macros\sind.sci",%f,%t);
25assert_checkequal(get_function_path("sind"), ref);
26