Skip to content

Commit aa64419

Browse files
notriddlecompiler-errors
authored andcommitted
Specify, more explicitly, the default behavior
1 parent 713eeaa commit aa64419

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

Diff for: src/rustdoc-internals/search.md

+6-7
Original file line numberDiff line numberDiff line change
@@ -380,16 +380,15 @@ The `.js` file is like a module (except the loader takes care of
380380
`FILTER_CRATE` can be left out (equivalent to searching "all crates"), but you
381381
have to specify `EXPECTED` or `PARSED`.
382382

383-
Additionally, the following magic comments are supported.
383+
By default, the test fails if any of the expected results are missing,
384+
or if the results don't appear in the specified order.
385+
The actual search results may, however, include results that aren't in the test.
386+
To override this, specify any of the following magic comments.
384387
Put them on their own line, without indenting.
385388

386389
* `// exact-check`: If search results appear that aren't part of the test case,
387-
then fail. By default, the test case will tolerate the engine returning more
388-
results than specified.
389-
* `// ignore-order`: By default, the entries in the test case must have a
390-
matching order in the results. Setting this option allows you to test
391-
filtering without also testing ranking, if you expect a test to be sensitive
392-
to minor scoring changes.
390+
then fail.
391+
* `// ignore-order`: Allow search results to appear in any order.
393392
* `// should-fail`: Used to write negative tests.
394393

395394
Standard library tests usually shouldn't specify `// exact-check`, since we

0 commit comments

Comments
 (0)