1 // =============================================================================
2 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 // Copyright (C) 2008 - DIGITEO - Allan CORNET
5 // This file is distributed under the same license as the Scilab package.
6 // =============================================================================
7 // <-- ENGLISH IMPOSED -->
8 // <-- Non-regression test for bug 3630 -->
10 // <-- Bugzilla URL -->
11 // http://bugzilla.scilab.org/show_bug.cgi?id=3630
13 // <-- Short Description -->
14 // functions added by addinter are not visible by 'what'
16 test_path = get_absolute_file_path('bug_3630.tst');
21 mkdir(OS_TMP_DIR,'bug_3630');
22 TEST_DIR = OS_TMP_DIR + filesep() + 'bug_3630';
23 copyfile(SCI+'/modules/dynamic_link/tests/nonreg_tests/bug_3630.c' , TEST_DIR + filesep() + 'bug_3630.c');
26 ilib_build('libc_fun',['c_sum','c_intsum';'c_sub','c_intsub'],files,[]);
27 [primitives1,commandes] = what();
28 nbprimitives1 = size(primitives1,'*');
29 // load the shared library
32 [primitives2,commandes] = what();
33 nbprimitives2 = size(primitives2,'*');
34 if (nbprimitives2 - nbprimitives1) <> 2 then bugmes();quit;end
35 if ~or(primitives2 == 'c_sum') then bugmes();quit;end
36 if ~or(primitives2 == 'c_sub') then bugmes();quit;end
37 // ulink() all libraries
41 [primitives3,commandes] = what();
42 nbprimitives3 = size(primitives3,'*');
43 if or(primitives3 == 'c_sum') then bugmes();quit;end
44 if or(primitives3 == 'c_sub') then bugmes();quit;end
45 if (nbprimitives3 - nbprimitives1) <> 0 then bugmes();quit;end
48 // =============================================================================