1 // =============================================================================
2 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 // Copyright (C) 2018 - Samuel GOUGEON
5 // This file is distributed under the same license as the Scilab package.
6 // =============================================================================
8 // <-- CLI SHELL MODE -->
9 // <-- NO CHECK REF -->
11 // <-- Non-regression test for bug 13796 -->
13 // <-- Bugzilla URL -->
14 // http://bugzilla.scilab.org/13796
16 // <-- Short Description -->
17 // tbx_generate_pofile()
18 // - missed _() and _gettext() references.
19 // - yielded #: comments with absolute location paths instead of relative
21 // - wrapped long lines even when they should not be so
23 path = TMPDIR+"/bug_13796";
24 copyfile(SCI+"/contrib/toolbox_skeleton", path);
25 mdelete(path+"/locales/*");
26 tbx_generate_pofile(path);
28 // Checking existence of the po file:
29 assert_checktrue(isfile(path+"/locales/en_US.po"));
31 // Checking some content:
32 f = mgetl(path+"/locales/en_US.po");
33 assert_checktrue(grep(f, pathconvert("#: ~\sci_gateway\cpp\sci_cpperror.cpp:23",%f))~=[]);
34 assert_checktrue(grep(f, "msgid ""%s: I''m waiting for only one argument.\n""")~=[]);
35 assert_checktrue(grep(f, "#: a XML file:5")~=[]);
36 assert_checktrue(grep(f, "msgid ""Height""")~=[]);