mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Update web-platform-tests to revision 7da6acfd668e66adae5ab4e2d389810d3b1460be
This commit is contained in:
parent
50db64a20e
commit
bae87d193d
307 changed files with 35826 additions and 209 deletions
|
@ -17,11 +17,16 @@ describe("Parses all of the IDLs to produce the correct ASTs", function () {
|
|||
|
||||
for (var i = 0, n = idls.length; i < n; i++) {
|
||||
var idl = idls[i], json = jsons[i];
|
||||
|
||||
var func = (function (idl, json) {
|
||||
return function () {
|
||||
try {
|
||||
var optFile = pth.join(__dirname, "syntax/opt", pth.basename(json));
|
||||
var opt = undefined;
|
||||
if (fs.existsSync(optFile))
|
||||
opt = JSON.parse(fs.readFileSync(optFile, "utf8"));
|
||||
var diff = jdp.diff(JSON.parse(fs.readFileSync(json, "utf8")),
|
||||
wp.parse(fs.readFileSync(idl, "utf8")));
|
||||
wp.parse(fs.readFileSync(idl, "utf8"), opt));
|
||||
if (diff && debug) console.log(JSON.stringify(diff, null, 4));
|
||||
expect(diff).to.be(undefined);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue