example_run() function: test the examples of the help pages
[scilab.git] / scilab / modules / development_tools / tests / unit_tests / example_run.dia.ref
1 // =============================================================================
2 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 // Copyright (C) 2012 - Scilab Enterprises - Vincent COUVERT
4 //
5 //  This file is distributed under the same license as the Scilab package.
6 // =============================================================================
7 // <-- CLI SHELL MODE -->
8 // Test errors
9 refMsg = msprintf(gettext("%s: Wrong type for input argument #%d: A row array of strings expected.\n"), "example_run", 1);
10 assert_checkerror("example_run(10);", refMsg);
11 refMsg = msprintf(gettext("%s: Wrong size for input argument #%d: A row array of strings expected.\n"), "example_run", 1);
12 assert_checkerror("example_run([""core"",""xml""]);", refMsg);
13 refMsg = msprintf(gettext("%s: Wrong type for input argument #%d: A row array of strings or empty matrix expected.\n"), "example_run", 2);
14 assert_checkerror("example_run(""core"", 12);", refMsg);
15 refMsg = msprintf(gettext("%s: Wrong size for input argument #%d: A row array of strings or empty matrix expected.\n"), "example_run", 2);
16 assert_checkerror("example_run(""core"", [""argn"", ""insertion""]);", refMsg);
17 refMsg = msprintf(gettext("%s: Wrong type for input argument #%d: A string expected.\n"), "example_run", 3);
18 assert_checkerror("example_run(""core"", ""argn"", 12);", refMsg);
19 refMsg = msprintf(gettext("%s: Wrong size for input argument #%d: A string expected.\n"), "example_run", 3);
20 assert_checkerror("example_run(""core"", ""argn"", [""en_US"", ""fr_FR""]);", refMsg);
21 refMsg = msprintf(gettext("%s: Wrong value for input argument #%d: A Scilab module name expected.\n"), "example_run", 1);
22 assert_checkerror("example_run(""toto"");", refMsg);
23 refMsg = msprintf(gettext("%s: Wrong value for input argument #%d: A ''%s'' module function name expected.\n"), "example_run", 2, "core");
24 assert_checkerror("example_run(""core"", ""doesnotexistsname"");", refMsg);
25 refMsg = msprintf(gettext("%s: Wrong value for input argument #%d: A valid language expected.\n"), "example_run", 3);
26 assert_checkerror("example_run(""core"", ""argn"", ""aa_BB"");", refMsg);
27 example_run("xml");
28    TMPDIR = TMPDIR
29
30    001/001 - [TMPDIR/xml_help] : 
31
32    001/030 - [TMPDIR/xml_help] XMLObjects_1..passed
33    002/030 - [TMPDIR/xml_help] XMLObjects_2..passed
34    003/030 - [TMPDIR/xml_help] XMLObjects_3..passed
35    004/030 - [TMPDIR/xml_help] XMLObjects_4..passed
36    005/030 - [TMPDIR/xml_help] XMLObjects_5..passed
37    006/030 - [TMPDIR/xml_help] XMLObjects_6..passed
38    007/030 - [TMPDIR/xml_help] XMLObjects_7..passed
39    008/030 - [TMPDIR/xml_help] xmlAddNs......passed
40    009/030 - [TMPDIR/xml_help] xmlAsNumber...passed
41    010/030 - [TMPDIR/xml_help] xmlAsText.....passed
42    011/030 - [TMPDIR/xml_help] xmlDTD........passed
43    012/030 - [TMPDIR/xml_help] xmlDelete.....passed
44    013/030 - [TMPDIR/xml_help] xmlDocument...passed
45    014/030 - [TMPDIR/xml_help] xmlDump.......passed
46    015/030 - [TMPDIR/xml_help] xmlElement....passed
47    016/030 - [TMPDIR/xml_help] xmlFormat.....passed
48    017/030 - [TMPDIR/xml_help] xmlGetNsByHref passed
49    018/030 - [TMPDIR/xml_help] xmlGetNsByPrefix passed
50    019/030 - [TMPDIR/xml_help] xmlGetOpenDocs passed
51    020/030 - [TMPDIR/xml_help] xmlIsValidObject passed
52    021/030 - [TMPDIR/xml_help] xmlNs.........passed
53    022/030 - [TMPDIR/xml_help] xmlRead.......passed
54    023/030 - [TMPDIR/xml_help] xmlReadStr....passed
55    024/030 - [TMPDIR/xml_help] xmlRelaxNG....passed
56    025/030 - [TMPDIR/xml_help] xmlRemove.....passed
57    026/030 - [TMPDIR/xml_help] xmlSchema.....passed
58    027/030 - [TMPDIR/xml_help] xmlSetAttributes passed
59    028/030 - [TMPDIR/xml_help] xmlValidate...passed
60    029/030 - [TMPDIR/xml_help] xmlWrite......passed
61    030/030 - [TMPDIR/xml_help] xmlXPath......passed
62
63
64    --------------------------------------------------------------------------
65    Summary
66
67    tests             30 - 100 % 
68    passed            30 - 100 % 
69    failed             0 -   0 % 
70    skipped            0 -   0 % 
71    length             38.82 sec 
72    --------------------------------------------------------------------------
73 example_run("core", "argn");
74    TMPDIR = TMPDIR
75
76    001/001 - [TMPDIR/core_help] : 
77
78    001/001 - [TMPDIR/core_help] argn.........passed
79
80
81    --------------------------------------------------------------------------
82    Summary
83
84    tests              1 - 100 % 
85    passed             1 - 100 % 
86    failed             0 -   0 % 
87    skipped            0 -   0 % 
88    length             1.19 sec 
89    --------------------------------------------------------------------------
90 example_run("core", ["argn"; "insertion"]);
91    TMPDIR = TMPDIR
92
93    001/001 - [TMPDIR/core_help] : 
94
95    001/002 - [TMPDIR/core_help] argn.........passed
96    002/002 - [TMPDIR/core_help] insertion....passed
97
98
99    --------------------------------------------------------------------------
100    Summary
101
102    tests              2 - 100 % 
103    passed             2 - 100 % 
104    failed             0 -   0 % 
105    skipped            0 -   0 % 
106    length             2.38 sec 
107    --------------------------------------------------------------------------
108 example_run("core", "argn", "en_US");
109    TMPDIR = TMPDIR
110
111    001/001 - [TMPDIR/core_help] : 
112
113    001/001 - [TMPDIR/core_help] argn.........passed
114
115
116    --------------------------------------------------------------------------
117    Summary
118
119    tests              1 - 100 % 
120    passed             1 - 100 % 
121    failed             0 -   0 % 
122    skipped            0 -   0 % 
123    length             1.18 sec 
124    --------------------------------------------------------------------------
125 example_run("core", "argn", "en_US", "no_check_error_output");
126    TMPDIR = TMPDIR
127
128    001/001 - [TMPDIR/core_help] : 
129
130    001/001 - [TMPDIR/core_help] argn.........passed
131
132
133    --------------------------------------------------------------------------
134    Summary
135
136    tests              1 - 100 % 
137    passed             1 - 100 % 
138    failed             0 -   0 % 
139    skipped            0 -   0 % 
140    length             1.15 sec 
141    --------------------------------------------------------------------------
142 example_run("core", "argn", "en_US", "no_check_error_output", TMPDIR + "/example_run.xml");
143    TMPDIR = TMPDIR
144
145    001/001 - [TMPDIR/core_help] : 
146
147    001/001 - [TMPDIR/core_help] argn.........passed
148
149
150    --------------------------------------------------------------------------
151    Summary
152
153    tests              1 - 100 % 
154    passed             1 - 100 % 
155    failed             0 -   0 % 
156    skipped            0 -   0 % 
157    length             1.19 sec 
158    --------------------------------------------------------------------------
159    Export to          TMPDIR/example_run.xml 
160    --------------------------------------------------------------------------