src/tools/rustdoc-js/tester.js before after
- @@ src/tools/rustdoc-js/tester.js: async function runChecks(testFile, doSearch, parseQuery, getCorrections) {
+ @@ src/tools/rustdoc-js/tester.js: async function runChecks(testFile, doSearch, parseQuery) {
return res;
}
/**
* Load searchNNN.js and search-indexNNN.js.
*
- @@ src/tools/rustdoc-js/tester.js: function loadSearchJS(doc_folder, resource_suffix) {
- };
-
+ @@ src/tools/rustdoc-js/tester.js: async function runChecks(testFile, doSearch, parseQuery) {
+ */
+ async function loadSearchJS(doc_folder, resource_suffix) {
const staticFiles = path.join(doc_folder, "static.files");
+ - const stringdexJs = fs.readdirSync(staticFiles).find(f => f.match(/stringdex.*\.js$/));
+ + const stringdexJs = mostRecentMatch(staticFiles, /stringdex.*\.js$/);
+ const stringdexModule = require(path.join(staticFiles, stringdexJs));
- const searchJs = fs.readdirSync(staticFiles).find(f => f.match(/search.*\.js$/));
+ const searchJs = mostRecentMatch(staticFiles, /search-[0-9a-f]{8}.*\.js$/);
const searchModule = require(path.join(staticFiles, searchJs));
- searchModule.initSearch(searchIndex.searchIndex);
- const docSearch = searchModule.docSearch;
+ globalThis.nonnull = (x, msg) => {
+ if (x === null) {