Skip to content

Commit

Permalink
Account for no newline before test annotations
Browse files Browse the repository at this point in the history
Previously the license comment would always provide that newline but
since that's been removed this change is needed.
  • Loading branch information
Mark-Simulacrum committed Dec 26, 2018
1 parent 2a66355 commit e132d90
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/tools/rustdoc-js/tester.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,12 @@ function loadContent(content) {
var Module = module.constructor;
var m = new Module();
m._compile(content, "tmp.js");
m.exports.ignore_order = content.indexOf("\n// ignore-order\n") !== -1;
m.exports.exact_check = content.indexOf("\n// exact-check\n") !== -1;
m.exports.should_fail = content.indexOf("\n// should-fail\n") !== -1;
m.exports.ignore_order = content.indexOf("\n// ignore-order\n") !== -1 ||
content.startsWith("// ignore-order\n");
m.exports.exact_check = content.indexOf("\n// exact-check\n") !== -1 ||
content.startsWith("// exact-check\n");
m.exports.should_fail = content.indexOf("\n// should-fail\n") !== -1 ||
content.startsWith("// should-fail\n");
return m.exports;
}

Expand Down

0 comments on commit e132d90

Please sign in to comment.