[Scilab-users] unit tests and help generation for overloaded unary/binary operators

philippe rouxph.22 at gmail.com
Sat Jun 18 11:53:25 CEST 2016


Le 16/06/2016 19:46, Samuel Gougeon a écrit :
> Hello Philippe,
>
> AFAIR, XML filenames must not have the "%" character. Moreover, xml ids
> must exclude it as well.

Ok, so I've added to my build_help.sce file the lines

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for fic=listfiles(help_lang_dir+'%bigint_*.xml')'
newfic=strsubst(fic,'%','')
printf('%s \n to \n %s\n',fic,newfic)
unix(' mv '+fic+' '+newfic)
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

> So, if the xml id of the page is currently "%bigint_o_bigint", you
> should rather choose something like "bigint_equal_bigint" instead.

I also removed the % in *.xml help files using the following lines :

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for fic=listfiles(help_lang_dir+'*.xml')'
unix('sed -i ''s/%bigint_/bigint_/g'' '+fic)
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

I don't know if i can do this without using bash command so that anyone
can build the toolbox even on windows system ? Any the way this is not
very important since the toolbox only contains only scilab macros (no
gateway needed ).

>
> help generation and unit tests are completely independent from each other.

yes but for maintainability it's easier if unit tests of myfunction.sci
is stored in myfunction.tst :-)

Know it works fine , Thanks a lot Samuel!

Philippe.




More information about the users mailing list