Add a error message when get_function_path has not input argument and fix test win...
[scilab.git] / scilab / modules / functions / tests / unit_tests / get_function_path.tst
index 6813419..4487077 100644 (file)
 // unit tests for get_function_path() function
 // =============================================================================
 
-assert_checkequal(get_function_path('abcd'),SCI+'/modules/cacsd/macros/abcd.sci');
-assert_checkequal(get_function_path('dae'),SCI+'/modules/differential_equations/macros/dae.sci');
-assert_checkequal(get_function_path('acosd'),SCI+'/modules/elementary_functions/macros/acosd.sci');
-assert_checkequal(get_function_path('dir'),SCI+'/modules/fileio/macros/dir.sci');
-assert_checkequal(get_function_path('get_function_path'),SCI+'/modules/functions/macros/get_function_path.sci');
-assert_checkequal(get_function_path('get_param'),SCI+'/modules/parameters/macros/get_param.sci');
-assert_checkequal(get_function_path('median'),SCI+'/modules/statistics/macros/median.sci');
-assert_checkequal(get_function_path('calendar'),SCI+'/modules/time/macros/calendar.sci');
+assert_checkequal(get_function_path('abcd'), pathconvert(getlongpathname(SCI+'/modules/cacsd/macros/abcd.sci'), %f));
+assert_checkequal(get_function_path('dae'), pathconvert(getlongpathname(SCI+'/modules/differential_equations/macros/dae.sci'), %f));
+assert_checkequal(get_function_path('acosd'), pathconvert(getlongpathname(SCI+'/modules/elementary_functions/macros/acosd.sci'), %f));
+assert_checkequal(get_function_path('dir'), pathconvert(getlongpathname(SCI+'/modules/fileio/macros/dir.sci'), %f));
+assert_checkequal(get_function_path('get_function_path'), pathconvert(getlongpathname(SCI+'/modules/functions/macros/get_function_path.sci'), %f));
+assert_checkequal(get_function_path('get_param'), pathconvert(getlongpathname(SCI+'/modules/parameters/macros/get_param.sci'), %f));
+assert_checkequal(get_function_path('median'), pathconvert(getlongpathname(SCI+'/modules/statistics/macros/median.sci'), %f));
+assert_checkequal(get_function_path('calendar'), pathconvert(getlongpathname(SCI+'/modules/time/macros/calendar.sci'), %f));
 
 assert_checkequal(get_function_path('eigs.sci'),[]);
 assert_checkfalse(execstr("get_function_path()","errcatch")==0);
+refMsg = msprintf(_("%s: Wrong number of input argument: %d expected.\n"), "get_function_path", 1);
+assert_checkerror("get_function_path()", refMsg);
 assert_checkfalse(execstr("get_function_path(eigs)","errcatch")==0);
+refMsg = msprintf(_("%s: Wrong type for input argument #%d: A string expected.\n"),"get_function_path",1);
+assert_checkerror("get_function_path(eigs)", refMsg);