mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Add documentation for writing new tests.
This commit is contained in:
parent
2de5407cda
commit
29cdab217f
1 changed files with 20 additions and 0 deletions
|
@ -96,6 +96,26 @@ log is saved, run from the root directory:
|
||||||
For CSSWG tests a similar prcedure works, with `./mach test-css` and
|
For CSSWG tests a similar prcedure works, with `./mach test-css` and
|
||||||
`./mach update-css`.
|
`./mach update-css`.
|
||||||
|
|
||||||
|
Writing new tests
|
||||||
|
=================
|
||||||
|
|
||||||
|
The simplest way to create a new test is to use the following command:
|
||||||
|
|
||||||
|
./mach create-wpt tests/wpt/path/to/new/test.html --no-run
|
||||||
|
|
||||||
|
This will create test.html in the appropriate directory using the WPT
|
||||||
|
template for JavaScript tests. To create a new reference test instead,
|
||||||
|
use the following:
|
||||||
|
|
||||||
|
./mach create-wpt --reftest tests/wpt/path/to/new/reftest.html --no-run --reference tests/wpt/path/to/reference.html
|
||||||
|
|
||||||
|
`reference.html` will be created if it doesn't not exist, and `reftest.html`
|
||||||
|
will be created using the WPT reftest template. These new tests can then
|
||||||
|
be run in the following manner like any other WPT test:
|
||||||
|
|
||||||
|
./mach test-wpt tests/wpt/path/to/new/test.html
|
||||||
|
./mach test-wpt tests/wpt/path/to/new/reftest.html
|
||||||
|
|
||||||
Editing tests
|
Editing tests
|
||||||
=============
|
=============
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue