Skip to content

Commit

Permalink
Migrate run-make/rustdoc-error-lines to rmake.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed May 5, 2024
1 parent 27e6741 commit bb474aa
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 14 deletions.
1 change: 0 additions & 1 deletion src/tools/tidy/src/allowed_run_make_makefiles.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 0 additions & 13 deletions tests/run-make/rustdoc-error-lines/Makefile

This file was deleted.

22 changes: 22 additions & 0 deletions tests/run-make/rustdoc-error-lines/rmake.rs
Original file line number Diff line number Diff line change
@@ -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);
}
}

0 comments on commit bb474aa

Please sign in to comment.