-
Notifications
You must be signed in to change notification settings - Fork 520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add docs for JS tests #2048
Add docs for JS tests #2048
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, feel free to merge this unless you want someone from rustdoc to review.
(I think we don't have r? on this repo lol) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good with one thing fixed.
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
Additionally, the following magic comments are supported. | ||
Put them on their own line, without indenting. | ||
|
||
* `// exact-check`: If search results appear that aren't part of the test case, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It also checks for the items sorting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't sorting checked by default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes but it's not mentioned anywhere before // ignore-order
as far as I can see. So better to precise it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it should be documented, but not under exact-check
, as order is checked regardless of the presence of exact-check
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I've pulled out the defaults description into the previous paragraph.
src/rustdoc-internals/search.md
Outdated
By default, the test fails if any of the expected results are missing, | ||
or if the results don't appear in the specified order. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't true, it only checks the order by default:
By default, the test fails if any of the expected results are missing, | |
or if the results don't appear in the specified order. | |
By default, the test fails if the results don't appear in the specified order. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you paraphrase what you think I said? Because what I meant to say can be paraphrased as:
By default, the test fails if any of the results specified in the test case are not found after running the search, or if the results found after running the search don't appear in the same order that they do in the test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... End of week. Sorry about that. ^^'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you prefer the paraphrase I gave, or the original one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer the one you commented.
CC @rust-lang/compiler-contributors can someone with perms please merge this? This rustdoc team seems to approve it. |
Update books ## rust-lang/book 5 commits in e7d217be2a75ef1753f0988d6ccaba4d7e376259..99cf75a5414fa8adbe3974bd0836661ca901708f 2024-09-23 16:18:39 UTC to 2024-09-11 18:38:03 UTC - translations: remove broken link (rust-lang/book#4036) - Update build instructions: include mdbook plugins (rust-lang/book#4032) - Add `cargo init` usage suggestion to 1.3 (rust-lang/book#4025) - Use immutable borrow of `TcpStream` when creating `BufReader` (rust-lang/book#4024) - Upgrade to Rust 1.81 (rust-lang/book#4031) ## rust-lang/edition-guide 1 commits in b3ca7ade0f87d7e3fb538776defc5b2cc4188172..c7ebae25cb4801a31b6f05353f6d85bfa6feedd1 2024-09-22 08:47:02 UTC to 2024-09-22 08:47:02 UTC - Update static_mut_refs now that it is a lint (rust-lang/edition-guide#322) ## rust-lang/reference 10 commits in 687faf9958c52116d003b41dfd29cc1cf44f5311..24fb2687cdbc54fa18ae4acf5d879cfceca77b2c 2024-09-22 09:07:12 UTC to 2024-09-10 19:24:17 UTC - do not talk about the 'address of a constant' (rust-lang/reference#1624) - Add spec identifier syntax to interior-mutability.md (rust-lang/reference#1585) - Add spec identifier syntax to input-format.md (rust-lang/reference#1584) - Document limitations on block doc comments (rust-lang/reference#1602) - Places based on misaligned pointers: also mention 'static's as a possible base for place projections (rust-lang/reference#1606) - type-layout: mention that call ABI compatibility is a separate concern (rust-lang/reference#1608) - stabilize `const_extern_fn` (rust-lang/reference#1596) - const_eval: update for const_mut_refs and const_refs_to_cell stabilization (rust-lang/reference#1590) - fix: unclosed tag `sup` (rust-lang/reference#1612) - Fix improper documentation on casting non_exhaustive enums (rust-lang/reference#1607) ## rust-lang/rustc-dev-guide 13 commits in 0ed9229..555f3de 2024-09-23 12:51:33 UTC to 2024-09-10 07:32:10 UTC - chore: add missing `.` (rust-lang/rustc-dev-guide#2074) - Add remark on required free disk space (rust-lang/rustc-dev-guide#2073) - fix broken links (rust-lang/rustc-dev-guide#2063) - Add advice about submitting potentially hard-to-review PRs (rust-lang/rustc-dev-guide#2036) - Edit a sentence for clarity (rust-lang/rustc-dev-guide#2071) - Emphasize how to run a single tool test (rust-lang/rustc-dev-guide#2070) - Remove chalk is owned by WG-traits (rust-lang/rustc-dev-guide#2068) - Fix conditions lowering text for enums with no fields (rust-lang/rustc-dev-guide#2066) - update proof tree chapter (rust-lang/rustc-dev-guide#2054) - Add docs for JS tests (rust-lang/rustc-dev-guide#2048) - Reflect `x.py test`'s `--rustc-args` option being renamed to `--compiletest-rustc-args` (rust-lang/rustc-dev-guide#2062) - we standardized on this more reliable command (rust-lang/rustc-dev-guide#2061) - Fix Typo and Remove Outdated Line About C Variadics (rust-lang/rustc-dev-guide#2060)
Update books ## rust-lang/book 5 commits in e7d217be2a75ef1753f0988d6ccaba4d7e376259..99cf75a5414fa8adbe3974bd0836661ca901708f 2024-09-23 16:18:39 UTC to 2024-09-11 18:38:03 UTC - translations: remove broken link (rust-lang/book#4036) - Update build instructions: include mdbook plugins (rust-lang/book#4032) - Add `cargo init` usage suggestion to 1.3 (rust-lang/book#4025) - Use immutable borrow of `TcpStream` when creating `BufReader` (rust-lang/book#4024) - Upgrade to Rust 1.81 (rust-lang/book#4031) ## rust-lang/edition-guide 1 commits in b3ca7ade0f87d7e3fb538776defc5b2cc4188172..c7ebae25cb4801a31b6f05353f6d85bfa6feedd1 2024-09-22 08:47:02 UTC to 2024-09-22 08:47:02 UTC - Update static_mut_refs now that it is a lint (rust-lang/edition-guide#322) ## rust-lang/reference 10 commits in 687faf9958c52116d003b41dfd29cc1cf44f5311..24fb2687cdbc54fa18ae4acf5d879cfceca77b2c 2024-09-22 09:07:12 UTC to 2024-09-10 19:24:17 UTC - do not talk about the 'address of a constant' (rust-lang/reference#1624) - Add spec identifier syntax to interior-mutability.md (rust-lang/reference#1585) - Add spec identifier syntax to input-format.md (rust-lang/reference#1584) - Document limitations on block doc comments (rust-lang/reference#1602) - Places based on misaligned pointers: also mention 'static's as a possible base for place projections (rust-lang/reference#1606) - type-layout: mention that call ABI compatibility is a separate concern (rust-lang/reference#1608) - stabilize `const_extern_fn` (rust-lang/reference#1596) - const_eval: update for const_mut_refs and const_refs_to_cell stabilization (rust-lang/reference#1590) - fix: unclosed tag `sup` (rust-lang/reference#1612) - Fix improper documentation on casting non_exhaustive enums (rust-lang/reference#1607) ## rust-lang/rustc-dev-guide 13 commits in 0ed9229..555f3de 2024-09-23 12:51:33 UTC to 2024-09-10 07:32:10 UTC - chore: add missing `.` (rust-lang/rustc-dev-guide#2074) - Add remark on required free disk space (rust-lang/rustc-dev-guide#2073) - fix broken links (rust-lang/rustc-dev-guide#2063) - Add advice about submitting potentially hard-to-review PRs (rust-lang/rustc-dev-guide#2036) - Edit a sentence for clarity (rust-lang/rustc-dev-guide#2071) - Emphasize how to run a single tool test (rust-lang/rustc-dev-guide#2070) - Remove chalk is owned by WG-traits (rust-lang/rustc-dev-guide#2068) - Fix conditions lowering text for enums with no fields (rust-lang/rustc-dev-guide#2066) - update proof tree chapter (rust-lang/rustc-dev-guide#2054) - Add docs for JS tests (rust-lang/rustc-dev-guide#2048) - Reflect `x.py test`'s `--rustc-args` option being renamed to `--compiletest-rustc-args` (rust-lang/rustc-dev-guide#2062) - we standardized on this more reliable command (rust-lang/rustc-dev-guide#2061) - Fix Typo and Remove Outdated Line About C Variadics (rust-lang/rustc-dev-guide#2060)
Rollup merge of rust-lang#130759 - rustbot:docs-update, r=ehuss Update books ## rust-lang/book 5 commits in e7d217be2a75ef1753f0988d6ccaba4d7e376259..99cf75a5414fa8adbe3974bd0836661ca901708f 2024-09-23 16:18:39 UTC to 2024-09-11 18:38:03 UTC - translations: remove broken link (rust-lang/book#4036) - Update build instructions: include mdbook plugins (rust-lang/book#4032) - Add `cargo init` usage suggestion to 1.3 (rust-lang/book#4025) - Use immutable borrow of `TcpStream` when creating `BufReader` (rust-lang/book#4024) - Upgrade to Rust 1.81 (rust-lang/book#4031) ## rust-lang/edition-guide 1 commits in b3ca7ade0f87d7e3fb538776defc5b2cc4188172..c7ebae25cb4801a31b6f05353f6d85bfa6feedd1 2024-09-22 08:47:02 UTC to 2024-09-22 08:47:02 UTC - Update static_mut_refs now that it is a lint (rust-lang/edition-guide#322) ## rust-lang/reference 10 commits in 687faf9958c52116d003b41dfd29cc1cf44f5311..24fb2687cdbc54fa18ae4acf5d879cfceca77b2c 2024-09-22 09:07:12 UTC to 2024-09-10 19:24:17 UTC - do not talk about the 'address of a constant' (rust-lang/reference#1624) - Add spec identifier syntax to interior-mutability.md (rust-lang/reference#1585) - Add spec identifier syntax to input-format.md (rust-lang/reference#1584) - Document limitations on block doc comments (rust-lang/reference#1602) - Places based on misaligned pointers: also mention 'static's as a possible base for place projections (rust-lang/reference#1606) - type-layout: mention that call ABI compatibility is a separate concern (rust-lang/reference#1608) - stabilize `const_extern_fn` (rust-lang/reference#1596) - const_eval: update for const_mut_refs and const_refs_to_cell stabilization (rust-lang/reference#1590) - fix: unclosed tag `sup` (rust-lang/reference#1612) - Fix improper documentation on casting non_exhaustive enums (rust-lang/reference#1607) ## rust-lang/rustc-dev-guide 13 commits in 0ed9229..555f3de 2024-09-23 12:51:33 UTC to 2024-09-10 07:32:10 UTC - chore: add missing `.` (rust-lang/rustc-dev-guide#2074) - Add remark on required free disk space (rust-lang/rustc-dev-guide#2073) - fix broken links (rust-lang/rustc-dev-guide#2063) - Add advice about submitting potentially hard-to-review PRs (rust-lang/rustc-dev-guide#2036) - Edit a sentence for clarity (rust-lang/rustc-dev-guide#2071) - Emphasize how to run a single tool test (rust-lang/rustc-dev-guide#2070) - Remove chalk is owned by WG-traits (rust-lang/rustc-dev-guide#2068) - Fix conditions lowering text for enums with no fields (rust-lang/rustc-dev-guide#2066) - update proof tree chapter (rust-lang/rustc-dev-guide#2054) - Add docs for JS tests (rust-lang/rustc-dev-guide#2048) - Reflect `x.py test`'s `--rustc-args` option being renamed to `--compiletest-rustc-args` (rust-lang/rustc-dev-guide#2062) - we standardized on this more reliable command (rust-lang/rustc-dev-guide#2061) - Fix Typo and Remove Outdated Line About C Variadics (rust-lang/rustc-dev-guide#2060)
Update books ## rust-lang/book 5 commits in e7d217be2a75ef1753f0988d6ccaba4d7e376259..99cf75a5414fa8adbe3974bd0836661ca901708f 2024-09-23 16:18:39 UTC to 2024-09-11 18:38:03 UTC - translations: remove broken link (rust-lang/book#4036) - Update build instructions: include mdbook plugins (rust-lang/book#4032) - Add `cargo init` usage suggestion to 1.3 (rust-lang/book#4025) - Use immutable borrow of `TcpStream` when creating `BufReader` (rust-lang/book#4024) - Upgrade to Rust 1.81 (rust-lang/book#4031) ## rust-lang/edition-guide 1 commits in b3ca7ade0f87d7e3fb538776defc5b2cc4188172..c7ebae25cb4801a31b6f05353f6d85bfa6feedd1 2024-09-22 08:47:02 UTC to 2024-09-22 08:47:02 UTC - Update static_mut_refs now that it is a lint (rust-lang/edition-guide#322) ## rust-lang/reference 10 commits in 687faf9958c52116d003b41dfd29cc1cf44f5311..24fb2687cdbc54fa18ae4acf5d879cfceca77b2c 2024-09-22 09:07:12 UTC to 2024-09-10 19:24:17 UTC - do not talk about the 'address of a constant' (rust-lang/reference#1624) - Add spec identifier syntax to interior-mutability.md (rust-lang/reference#1585) - Add spec identifier syntax to input-format.md (rust-lang/reference#1584) - Document limitations on block doc comments (rust-lang/reference#1602) - Places based on misaligned pointers: also mention 'static's as a possible base for place projections (rust-lang/reference#1606) - type-layout: mention that call ABI compatibility is a separate concern (rust-lang/reference#1608) - stabilize `const_extern_fn` (rust-lang/reference#1596) - const_eval: update for const_mut_refs and const_refs_to_cell stabilization (rust-lang/reference#1590) - fix: unclosed tag `sup` (rust-lang/reference#1612) - Fix improper documentation on casting non_exhaustive enums (rust-lang/reference#1607) ## rust-lang/rustc-dev-guide 13 commits in 0ed9229f5b6f7824b333beabd7e3d5ba4b9bd971..555f3de2fa0d61c4294b74d245f1cbad6fcbf589 2024-09-23 12:51:33 UTC to 2024-09-10 07:32:10 UTC - chore: add missing `.` (rust-lang/rustc-dev-guide#2074) - Add remark on required free disk space (rust-lang/rustc-dev-guide#2073) - fix broken links (rust-lang/rustc-dev-guide#2063) - Add advice about submitting potentially hard-to-review PRs (rust-lang/rustc-dev-guide#2036) - Edit a sentence for clarity (rust-lang/rustc-dev-guide#2071) - Emphasize how to run a single tool test (rust-lang/rustc-dev-guide#2070) - Remove chalk is owned by WG-traits (rust-lang/rustc-dev-guide#2068) - Fix conditions lowering text for enums with no fields (rust-lang/rustc-dev-guide#2066) - update proof tree chapter (rust-lang/rustc-dev-guide#2054) - Add docs for JS tests (rust-lang/rustc-dev-guide#2048) - Reflect `x.py test`'s `--rustc-args` option being renamed to `--compiletest-rustc-args` (rust-lang/rustc-dev-guide#2062) - we standardized on this more reliable command (rust-lang/rustc-dev-guide#2061) - Fix Typo and Remove Outdated Line About C Variadics (rust-lang/rustc-dev-guide#2060)
No description provided.