mirror of
https://github.com/servo/servo
synced 2026-05-02 20:32:02 +02:00
Update web-platform-tests to revision 7da6acfd668e66adae5ab4e2d389810d3b1460be
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user