about summary refs log tree commit diff
path: root/src/tools/rustdoc-js
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2022-02-03 22:43:02 +0100
committerGuillaume Gomez <guillaume.gomez@huawei.com>2022-02-03 22:59:33 +0100
commit17fe3068d22a33aa13392379bf0ffc3a0ba545c1 (patch)
tree06e61d1bdf623c5fe424faa70f9d304dc40a926f /src/tools/rustdoc-js
parentcfa677666cd7982cba107736be9fcc730d5bf6bf (diff)
downloadrust-17fe3068d22a33aa13392379bf0ffc3a0ba545c1.tar.gz
rust-17fe3068d22a33aa13392379bf0ffc3a0ba545c1.zip
Update tester to have FILTER_CRATE set to null if undefined.
Diffstat (limited to 'src/tools/rustdoc-js')
-rw-r--r--src/tools/rustdoc-js/tester.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tools/rustdoc-js/tester.js b/src/tools/rustdoc-js/tester.js
index 4f73a7f6340..dbf5cf9650c 100644
--- a/src/tools/rustdoc-js/tester.js
+++ b/src/tools/rustdoc-js/tester.js
@@ -357,6 +357,8 @@ function runChecks(testFile, loaded, index) {
     var testFileContent = readFile(testFile) + 'exports.QUERY = QUERY;exports.EXPECTED = EXPECTED;';
     if (testFileContent.indexOf("FILTER_CRATE") !== -1) {
         testFileContent += "exports.FILTER_CRATE = FILTER_CRATE;";
+    } else {
+        testFileContent += "exports.FILTER_CRATE = null;";
     }
     var loadedFile = loadContent(testFileContent);