1 |
<?xml version="1.0" ?> |
2 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
3 |
<html xmlns="http://www.w3.org/1999/xhtml"> |
4 |
<head> |
5 |
<title>wttjs.pl - WebIDL ECMAScript Binding Test Suite Generator</title> |
6 |
<link rel="stylesheet" href="http://suika.fam.cx/www/style/html/pod.css" type="text/css" /> |
7 |
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> |
8 |
<link rev="made" href="mailto:wakaba@suika.fam.cx" /> |
9 |
</head> |
10 |
|
11 |
<body> |
12 |
|
13 |
|
14 |
<!-- INDEX BEGIN --> |
15 |
<div name="index"> |
16 |
<p><a name="__index__"></a></p> |
17 |
|
18 |
<ul> |
19 |
|
20 |
<li><a href="#name">NAME</a></li> |
21 |
<li><a href="#synopsis">SYNOPSIS</a></li> |
22 |
<li><a href="#description">DESCRIPTION</a></li> |
23 |
<li><a href="#arguments">ARGUMENTS</a></li> |
24 |
<li><a href="#dependency">DEPENDENCY</a></li> |
25 |
<li><a href="#see_also">SEE ALSO</a></li> |
26 |
<li><a href="#author">AUTHOR</a></li> |
27 |
<li><a href="#license">LICENSE</a></li> |
28 |
</ul> |
29 |
|
30 |
<hr name="index" /> |
31 |
</div> |
32 |
<!-- INDEX END --> |
33 |
|
34 |
<p> |
35 |
</p> |
36 |
<h1><a name="name">NAME</a></h1> |
37 |
<p>wttjs.pl - WebIDL ECMAScript Binding Test Suite Generator</p> |
38 |
<p> |
39 |
</p> |
40 |
<hr /> |
41 |
<h1><a name="synopsis">SYNOPSIS</a></h1> |
42 |
<pre> |
43 |
$ perl wttjs.pl \ |
44 |
--idl-file-name input.idl \ |
45 |
--instances-file-name input.json \ |
46 |
--test-dir-name output-dir/ \ |
47 |
--testset-id testname</pre> |
48 |
<pre> |
49 |
$ perl wttjs.pl --help</pre> |
50 |
<p> |
51 |
</p> |
52 |
<hr /> |
53 |
<h1><a name="description">DESCRIPTION</a></h1> |
54 |
<p>The script <code>wttjs.pl</code> generates a set of test cases for the |
55 |
conformance of a Web browser's DOM implementation, with regard to a |
56 |
set of interfaces described by a WebIDL fragment.</p> |
57 |
<p>For more information, see the readme document |
58 |
<a href="http://suika.fam.cx/www/webidl2tests/readme">http://suika.fam.cx/www/webidl2tests/readme</a>.</p> |
59 |
<p> |
60 |
</p> |
61 |
<hr /> |
62 |
<h1><a name="arguments">ARGUMENTS</a></h1> |
63 |
<p>This script accepts command-line arguments in the |
64 |
<a href="http://suika.fam.cx/www/markup/html/whatpm/Getopt/Long.html">Getopt::Long</a> style. Any argument can be specified at |
65 |
most once.</p> |
66 |
<dl> |
67 |
<dt><strong><a name="help" class="item"><code>--help</code></a></strong> |
68 |
|
69 |
<dd> |
70 |
<p>Show the help on the command-line arguments and exit the script.</p> |
71 |
</dd> |
72 |
</li> |
73 |
<dt><strong><a name="idl" class="item"><code>--idl-file-name file-name.idl</code> (<strong>REQUIRED</strong>)</a></strong> |
74 |
|
75 |
<dd> |
76 |
<p>The name or path of the file that contains the IDL fragment that |
77 |
defines a set of interfaces and exceptions to be tested against.</p> |
78 |
</dd> |
79 |
<dd> |
80 |
<p>If this argument is not specified, if the specified file is not found, |
81 |
or if the file cannot be read due to some I/O error, the script would |
82 |
exit with an error message.</p> |
83 |
</dd> |
84 |
<dd> |
85 |
<p>The file must be encoded in UTF-8 (Perl's <code>utf-8</code> encoding). |
86 |
Otherwise, the result test cases might be broken.</p> |
87 |
</dd> |
88 |
<dd> |
89 |
<p>The file must contain a syntactically valid IDL fragment. Any failure |
90 |
to conform to the WebIDL syntax would be reported to the standard |
91 |
error output. Such errors are handled by the CSS-like |
92 |
forward-compatible parsing rule as implemented by the |
93 |
<a href="http://suika.fam.cx/www/markup/html/whatpm/Whatpm/WebIDL.html">Whatpm::WebIDL</a> parser.</p> |
94 |
</dd> |
95 |
<dd> |
96 |
<p>Though the content of the file don't have to be a conforming IDL |
97 |
fragment, the result test cases might be broken if it is not. It is |
98 |
encouraged to check the conformance of the input IDL fragment by a |
99 |
conformance checker, e.g. WebHACC |
100 |
<a href="http://suika.fam.cx/gate/2007/html/cc/">http://suika.fam.cx/gate/2007/html/cc/</a>.</p> |
101 |
</dd> |
102 |
</li> |
103 |
<dt><strong><a name="json" class="item"><code>--instances-file-name file-name.json</code> (Default: No instance generation)</a></strong> |
104 |
|
105 |
<dd> |
106 |
<p>The name or path of the file that contains supplement information on |
107 |
interfaces and exceptions defined in the IDL fragment.</p> |
108 |
</dd> |
109 |
<dd> |
110 |
<p>If the specified file is not found, or if the file cannot be read due |
111 |
to some I/O error, the script would exit with an error message.</p> |
112 |
</dd> |
113 |
<dd> |
114 |
<p>The file must be encoded in UTF-8 (Perl's <code>utf-8</code> encoding). |
115 |
Otherwise, the file might be considered as broken, or the result test |
116 |
cases might be broken.</p> |
117 |
</dd> |
118 |
<dd> |
119 |
<p>The file must contain a JSON representation of a data structure |
120 |
described in the readme document. If the content is not valid as |
121 |
JSON, then the script would exit with an error message. If the |
122 |
content does not encode the data structure specified in the readme |
123 |
document, the script might exit with a Perl script execution error. |
124 |
Even when no Perl error stops the script, the result test cases might |
125 |
be broken.</p> |
126 |
</dd> |
127 |
<dd> |
128 |
<p>If this argument is not specified, then it is assumed that no |
129 |
additional information is available.</p> |
130 |
</dd> |
131 |
</li> |
132 |
<dt><strong><a name="test_dir_name_path_to_dir_default_tests" class="item"><code>--test-dir-name path-to-dir/</code> (Default: <code>./tests/</code>)</a></strong> |
133 |
|
134 |
<dd> |
135 |
<p>The name or path of the directory, in which the directory for the test |
136 |
files is created.</p> |
137 |
</dd> |
138 |
<dd> |
139 |
<p>The default value that is used when this argument is not specified is |
140 |
<code>./tests/</code>.</p> |
141 |
</dd> |
142 |
<dd> |
143 |
<p>All files generated by this script is put into the directory |
144 |
<code>test-dir-name/testset-id/</code>, where <em>test-dir-name</em> is the |
145 |
value specified by the <code>--test-dir-name</code> argument and <em>testset-id</em> |
146 |
is the value specified by the <code>--testset-id</code> argument. If there is |
147 |
no such a directory, then it is created by the script.</p> |
148 |
</dd> |
149 |
</li> |
150 |
<dt><strong><a name="id" class="item"><code>--testset-id id</code> (<strong>REQUIRED</strong>)</a></strong> |
151 |
|
152 |
<dd> |
153 |
<p>The identifier of the test suite.</p> |
154 |
</dd> |
155 |
<dd> |
156 |
<p>If this argument is not specified, the script would exit with an error |
157 |
message.</p> |
158 |
</dd> |
159 |
<dd> |
160 |
<p>Though any value can be specified as identifier, it should be a string |
161 |
consist of characters <code>a</code>..<code>z</code>, <code>0</code>..<code>9</code>, and <code>-</code> only, with no |
162 |
leading <code>-</code> character, for filesystem safety and compatibility with |
163 |
the test result summary script (see the readme document).</p> |
164 |
</dd> |
165 |
</li> |
166 |
</dl> |
167 |
<p> |
168 |
</p> |
169 |
<hr /> |
170 |
<h1><a name="dependency">DEPENDENCY</a></h1> |
171 |
<p>This script, in addition to Perl 5.8.* or later, requires the |
172 |
following modules:</p> |
173 |
<dl> |
174 |
<dt><strong><a name="json_json" class="item"><em>JSON</em></a></strong> |
175 |
|
176 |
<dd> |
177 |
<p>A JSON parser and serializer, which is available from CPAN.</p> |
178 |
</dd> |
179 |
<dd> |
180 |
<p>To install the <em>JSON</em> module from the CPAN, type:</p> |
181 |
</dd> |
182 |
<dd> |
183 |
<pre> |
184 |
# perl -MCPAN -eshell |
185 |
cpan> install JSON</pre> |
186 |
</dd> |
187 |
</li> |
188 |
<dt><strong><a name="whatpm_webidl_whatpm_webidl" class="item"><a href="http://suika.fam.cx/www/markup/html/whatpm/Whatpm/WebIDL.html">Whatpm::WebIDL</a></a></strong> |
189 |
|
190 |
<dd> |
191 |
<p>A WebIDL parser and object model implementation, which is part of the |
192 |
Whatpm package <a href="http://suika.fam.cx/www/markup/html/whatpm/readme">http://suika.fam.cx/www/markup/html/whatpm/readme</a>.</p> |
193 |
</dd> |
194 |
<dd> |
195 |
<p>Note that <a href="http://suika.fam.cx/www/markup/html/whatpm/Whatpm/WebIDL.html">Whatpm::WebIDL</a> does not depend on any |
196 |
other module.</p> |
197 |
</dd> |
198 |
</li> |
199 |
</dl> |
200 |
<p> |
201 |
</p> |
202 |
<hr /> |
203 |
<h1><a name="see_also">SEE ALSO</a></h1> |
204 |
<p>Readme <a href="http://suika.fam.cx/www/webidl2tests/readme">http://suika.fam.cx/www/webidl2tests/readme</a>.</p> |
205 |
<p>Web IDL specification, revision 1.96 (3 September 2008 Editor's Draft) |
206 |
<a href="http://dev.w3.org/cvsweb/~checkout~/2006/webapi/WebIDL/Overview.html?rev=1.96&content-type=text/html;%20charset=utf-8">http://dev.w3.org/cvsweb/~checkout~/2006/webapi/WebIDL/Overview.html</a>.</p> |
207 |
<p><a href="http://suika.fam.cx/www/markup/html/whatpm/Whatpm/WebIDL.html">Whatpm::WebIDL</a>, which is used to parse IDL |
208 |
fragments.</p> |
209 |
<p> |
210 |
</p> |
211 |
<hr /> |
212 |
<h1><a name="author">AUTHOR</a></h1> |
213 |
<p>Wakaba <<a href="mailto:w@suika.fam.cx">w@suika.fam.cx</a>></p> |
214 |
<p> |
215 |
</p> |
216 |
<hr /> |
217 |
<h1><a name="license">LICENSE</a></h1> |
218 |
<p>Copyright 2008 Wakaba <<a href="mailto:w@suika.fam.cx">w@suika.fam.cx</a>></p> |
219 |
<p>This library is free software; you can redistribute it and/or modify |
220 |
it under the same terms as Perl itself.</p> |
221 |
|
222 |
</body> |
223 |
|
224 |
</html> |