Skip to content

Commit b6d9bde

Browse files
Migrate run-make/rustdoc-scrape-examples-test to new rmake.rs
1 parent 7c73595 commit b6d9bde

File tree

6 files changed

+11
-10
lines changed

6 files changed

+11
-10
lines changed

tests/run-make/rustdoc-scrape-examples-invalid-expr/rmake.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
mod scrape;
33

44
fn main() {
5-
scrape::scrape();
5+
scrape::scrape(&[]);
66
}

tests/run-make/rustdoc-scrape-examples-ordering/rmake.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
mod scrape;
33

44
fn main() {
5-
scrape::scrape();
5+
scrape::scrape(&[]);
66
}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
mod scrape;
22

33
fn main() {
4-
scrape::scrape();
4+
scrape::scrape(&[]);
55
}

tests/run-make/rustdoc-scrape-examples-remap/scrape.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use run_make_support::{htmldocck, rustc, rustdoc, source_path, tmp_dir};
22
use std::fs::read_dir;
33
use std::path::Path;
44

5-
pub fn scrape() {
5+
pub fn scrape(extra_args: &[&str]) {
66
let lib_dir = tmp_dir();
77
let out_dir = tmp_dir().join("rustdoc");
88
let crate_name = "foobar";
@@ -29,6 +29,7 @@ pub fn scrape() {
2929
.arg(&out_example)
3030
.arg("--scrape-examples-target-crate")
3131
.arg(crate_name)
32+
.args(extra_args)
3233
.run();
3334
out_deps.push(out_example);
3435
}

tests/run-make/rustdoc-scrape-examples-test/Makefile

-6
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#[path = "../rustdoc-scrape-examples-remap/scrape.rs"]
2+
mod scrape;
3+
4+
fn main() {
5+
scrape::scrape(&["--scrape-tests"]);
6+
}

0 commit comments

Comments
 (0)