rewrite rustdoc-default-output to rmake

This commit is contained in:
Oneirical 2024-07-29 15:37:45 -04:00
parent e9f45e1eb2
commit c27fa5c332
6 changed files with 16 additions and 7 deletions

View File

@ -19,7 +19,6 @@ run-make/issue-36710/Makefile
run-make/issue-47551/Makefile
run-make/issue-69368/Makefile
run-make/issue-84395-lto-embed-bitcode/Makefile
run-make/issue-88756-default-output/Makefile
run-make/jobserver-error/Makefile
run-make/libs-through-symlinks/Makefile
run-make/libtest-json/Makefile

View File

@ -1,4 +0,0 @@
include ../tools.mk
all:
$(BARE_RUSTDOC) 2>&1 | sed -E 's@/nightly/|/beta/|/stable/|/1\.[0-9]+\.[0-9]+/@/$$CHANNEL/@g' | diff - output-default.stdout

View File

@ -1 +0,0 @@
This is a test to verify that the default behavior of `rustdoc` is printing out help output instead of erroring out (#88756).

View File

@ -1 +0,0 @@
// nothing to see here

View File

@ -0,0 +1,16 @@
// Calling rustdoc with no arguments, which should bring up a help menu, used to
// cause an error as rustdoc expects an input file. Fixed in #98331, this test
// ensures the output of rustdoc's help menu is as expected.
// See https://github.com/rust-lang/rust/issues/88756
use run_make_support::{bare_rustdoc, diff};
fn main() {
let out = bare_rustdoc().run().stdout_utf8();
diff()
.expected_file("output-default.stdout")
.actual_text("actual", out)
// replace the channel type in the URL with $CHANNEL
.normalize(r"nightly/|beta/|stable/|1\.[0-9]+\.[0-9]+/", "$$CHANNEL/")
.run();
}