Skip to content

Commit 4b1e25c

Browse files
committed
rustdoc-search: add an integration test for CCI
Part of rust-lang/rust#130676
1 parent 38bd4cf commit 4b1e25c

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

src/rustdoc-internals/search.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,4 +521,25 @@ const EXPECTED = [
521521
returned: [],
522522
},
523523
]
524-
```
524+
```
525+
526+
If the [`//@ revisions`] directive is used, the JS file will
527+
have access to a variable called `REVISION`.
528+
529+
```js
530+
const EXPECTED = [
531+
// This first test targets name-based search.
532+
{
533+
query: "constructor",
534+
others: REVISION === "has_constructor" ?
535+
[
536+
{ path: "constructor_search", name: "constructor" },
537+
] :
538+
[],
539+
in_args: [],
540+
returned: [],
541+
},
542+
];
543+
```
544+
545+
[`//@ revisions`]: ../tests/compiletest.md#revisions

0 commit comments

Comments
 (0)