Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit e132d90

Browse files
Account for no newline before test annotations
Previously the license comment would always provide that newline but since that's been removed this change is needed.
1 parent 2a66355 commit e132d90

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/tools/rustdoc-js/tester.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,12 @@ function loadContent(content) {
164164
var Module = module.constructor;
165165
var m = new Module();
166166
m._compile(content, "tmp.js");
167-
m.exports.ignore_order = content.indexOf("\n// ignore-order\n") !== -1;
168-
m.exports.exact_check = content.indexOf("\n// exact-check\n") !== -1;
169-
m.exports.should_fail = content.indexOf("\n// should-fail\n") !== -1;
167+
m.exports.ignore_order = content.indexOf("\n// ignore-order\n") !== -1 ||
168+
content.startsWith("// ignore-order\n");
169+
m.exports.exact_check = content.indexOf("\n// exact-check\n") !== -1 ||
170+
content.startsWith("// exact-check\n");
171+
m.exports.should_fail = content.indexOf("\n// should-fail\n") !== -1 ||
172+
content.startsWith("// should-fail\n");
170173
return m.exports;
171174
}
172175

0 commit comments

Comments
 (0)