mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 08:44:35 +00:00
Migrate run-make/rustdoc-error-lines
to rmake.rs
This commit is contained in:
parent
823b423d4c
commit
34fe2172b1
@ -244,7 +244,6 @@ run-make/rlib-format-packed-bundled-libs-3/Makefile
|
||||
run-make/rlib-format-packed-bundled-libs/Makefile
|
||||
run-make/rmeta-preferred/Makefile
|
||||
run-make/rustc-macro-dep-files/Makefile
|
||||
run-make/rustdoc-error-lines/Makefile
|
||||
run-make/rustdoc-io-error/Makefile
|
||||
run-make/rustdoc-map-file/Makefile
|
||||
run-make/rustdoc-output-path/Makefile
|
||||
|
@ -1,13 +0,0 @@
|
||||
include ../tools.mk
|
||||
|
||||
# Test that hir-tree output doesn't crash and includes
|
||||
# the string constant we would expect to see.
|
||||
|
||||
all:
|
||||
$(RUSTDOC) --test input.rs > $(TMPDIR)/output || true
|
||||
$(CGREP) 'input.rs - foo (line 5)' < $(TMPDIR)/output
|
||||
$(CGREP) 'input.rs:7:15' < $(TMPDIR)/output
|
||||
$(CGREP) 'input.rs - bar (line 15)' < $(TMPDIR)/output
|
||||
$(CGREP) 'input.rs:17:15' < $(TMPDIR)/output
|
||||
$(CGREP) 'input.rs - bar (line 24)' < $(TMPDIR)/output
|
||||
$(CGREP) 'input.rs:26:15' < $(TMPDIR)/output
|
22
tests/run-make/rustdoc-error-lines/rmake.rs
Normal file
22
tests/run-make/rustdoc-error-lines/rmake.rs
Normal file
@ -0,0 +1,22 @@
|
||||
// Assert that the search index is generated deterministically, regardless of the
|
||||
// order that crates are documented in.
|
||||
|
||||
use run_make_support::rustdoc;
|
||||
|
||||
fn main() {
|
||||
let output =
|
||||
String::from_utf8(rustdoc().input("input.rs").arg("--test").command_output().stdout)
|
||||
.unwrap();
|
||||
|
||||
let should_contain = &[
|
||||
"input.rs - foo (line 5)",
|
||||
"input.rs:7:15",
|
||||
"input.rs - bar (line 15)",
|
||||
"input.rs:17:15",
|
||||
"input.rs - bar (line 24)",
|
||||
"input.rs:26:15",
|
||||
];
|
||||
for text in should_contain {
|
||||
assert!(output.contains(text), "output doesn't contains {:?}", text);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user