From 28ce0b9940f985e32890b8997dd1406705dde55f Mon Sep 17 00:00:00 2001 From: Lukas Markeffsky <@> Date: Sun, 21 May 2023 17:03:08 +0200 Subject: [PATCH] rustdoc: add test for strikethrough with single tildes Also merge the two almost identical strikethrough tests together and document what the test tests. --- tests/rustdoc/strikethrough-in-summary.rs | 6 ------ tests/rustdoc/test-strikethrough.rs | 13 ++++++++++--- 2 files changed, 10 insertions(+), 9 deletions(-) delete mode 100644 tests/rustdoc/strikethrough-in-summary.rs diff --git a/tests/rustdoc/strikethrough-in-summary.rs b/tests/rustdoc/strikethrough-in-summary.rs deleted file mode 100644 index cb6cd0e7ba64d..0000000000000 --- a/tests/rustdoc/strikethrough-in-summary.rs +++ /dev/null @@ -1,6 +0,0 @@ -#![crate_name = "foo"] - -// @has foo/index.html '//del' 'strike' - -/// ~~strike~~ -pub fn strike() {} diff --git a/tests/rustdoc/test-strikethrough.rs b/tests/rustdoc/test-strikethrough.rs index c7855729a98ee..58162153b9e49 100644 --- a/tests/rustdoc/test-strikethrough.rs +++ b/tests/rustdoc/test-strikethrough.rs @@ -1,6 +1,13 @@ #![crate_name = "foo"] -// @has foo/fn.f.html -// @has - //del "Y" -/// ~~Y~~ +// Test that strikethrough works with single and double tildes and that it shows up on +// the item's dedicated page as well as the parent module's summary of items. + +// @has foo/index.html //del 'strike' +// @has foo/index.html //del 'through' + +// @has foo/fn.f.html //del 'strike' +// @has foo/fn.f.html //del 'through' + +/// ~~strike~~ ~through~ pub fn f() {}