rust/tests/rustdoc-js-std
Michael Howell 0ea58e2346 rustdoc-search: count path edits with separate edit limit
Since the two are counted separately elsewhere, they should get
their own limits, too. The biggest problem with combining them
is that paths are loosely checked by not requiring every component
to match, which means that if they are short and matched loosely,
they can easily find "drunk typist" matches that make no sense,
like this old result:

    std::collections::btree_map::itermut matching slice::itermut
    maxEditDistance = ("slice::itermut".length) / 3 = 14 / 3 = 4
    editDistance("std", "slice") = 4
    editDistance("itermut", "itermut") = 0
        4 + 0 <= 4 PASS

Of course, `slice::itermut` should not match stuff from btreemap.
`slice` should not match `std`.

The new result counts them separately:

    maxPathEditDistance = "slice".length / 3 = 5 / 3 = 1
    maxEditDistance = "itermut".length / 3 = 7 / 3 = 2
    editDistance("std", "slice") = 4
        4 <= 1 FAIL

Effectively, this makes path queries less "typo-resistant".
It's not zero, but it means `vec` won't match the `v1` prelude.

Queries without parent paths are unchanged.
2023-12-26 18:46:17 -07:00
..
alias-1.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
alias-2.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
alias-3.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
alias-4.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
alias.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
asrawfd.js rustdoc-search: count path edits with separate edit limit 2023-12-26 18:46:17 -07:00
basic.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
bufread-fill-buf.js rustdoc-search: fix order-independence bug 2023-06-11 18:57:33 -07:00
deduplication.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
enum-option.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
filter-crate.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
fn-forget.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
from_u.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
full-path-function.js Add tests for type-based search 2023-09-01 15:16:11 +02:00
iterator-type-signatures.js rustdoc-search: add support for associated types 2023-11-19 18:54:36 -07:00
keyword.js rustdoc-search: make primitives and keywords less special 2023-11-21 13:59:26 -07:00
macro-check.js rustdoc-search: make primitives and keywords less special 2023-11-21 13:59:26 -07:00
macro-print.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
never.js rustdoc-search: search never type with ! 2023-06-12 17:30:23 -07:00
option-type-signatures.js rustdoc-search: fix bugs when unboxing and reordering combine 2023-09-09 16:58:37 -07:00
osstring-to-string.js rustdoc: add note about slice/array searches to help popup 2023-06-10 14:08:26 -07:00
parser-bindings.js rustdoc-search: make primitives and keywords less special 2023-11-21 13:59:26 -07:00
parser-errors.js rustdoc-search: replace TAB/NL/LF with SP first 2023-11-29 11:02:56 -07:00
parser-filter.js rustdoc-search: make primitives and keywords less special 2023-11-21 13:59:26 -07:00
parser-generics.js Update rustdoc-js-std tests 2023-06-14 14:22:17 +02:00
parser-ident.js rustdoc-search: make primitives and keywords less special 2023-11-21 13:59:26 -07:00
parser-literal.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
parser-paths.js rustdoc-search: allow :: and :: 2023-11-29 11:02:50 -07:00
parser-quote.js Update rustdoc-js-std tests 2023-06-14 14:22:17 +02:00
parser-returned.js rustdoc-search: make primitives and keywords less special 2023-11-21 13:59:26 -07:00
parser-separators.js rustdoc-search: replace TAB/NL/LF with SP first 2023-11-29 11:02:56 -07:00
parser-slice-array.js rustdoc-search: make primitives and keywords less special 2023-11-21 13:59:26 -07:00
parser-weird-queries.js rustdoc-search: replace TAB/NL/LF with SP first 2023-11-29 11:02:56 -07:00
path-maxeditdistance.js rustdoc-search: count path edits with separate edit limit 2023-12-26 18:46:17 -07:00
path-ordering.js rustdoc-search: count path edits with separate edit limit 2023-12-26 18:46:17 -07:00
primitive.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
println-typo.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
quoted.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
reference-shrink.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
regex.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
return-specific-literal.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
return-specific.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
should-fail.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
simd-type-signatures.js Update std::simd usage and test outputs 2023-11-26 09:02:25 -05:00
string-from_ut.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
struct-vec.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
typed-query.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
vec-new.js Add "vec new" test 2023-06-14 14:22:17 +02:00
vec-type-signatures.js rustdoc-search: fix bugs when unboxing and reordering combine 2023-09-09 16:58:37 -07:00