Add test for prev/back arrows + examples across multiple files
This commit is contained in:
parent
f10dceeae2
commit
9e4958a3e6
21
src/test/run-make/rustdoc-scrape-examples-multiple/Makefile
Normal file
21
src/test/run-make/rustdoc-scrape-examples-multiple/Makefile
Normal file
@ -0,0 +1,21 @@
|
||||
-include ../../run-make-fulldeps/tools.mk
|
||||
|
||||
OUTPUT_DIR := "$(TMPDIR)/rustdoc"
|
||||
|
||||
all: $(TMPDIR)/ex.calls $(TMPDIR)/ex2.calls
|
||||
$(RUSTDOC) src/lib.rs --crate-name foobar --crate-type lib --output $(OUTPUT_DIR) \
|
||||
-Z unstable-options \
|
||||
--with-examples $(TMPDIR)/ex.calls \
|
||||
--with-examples $(TMPDIR)/ex2.calls
|
||||
|
||||
$(HTMLDOCCK) $(OUTPUT_DIR) src/lib.rs
|
||||
|
||||
$(TMPDIR)/%.calls: $(TMPDIR)/libfoobar.rmeta
|
||||
$(RUSTDOC) examples/$*.rs --crate-name $* --crate-type bin --output $(OUTPUT_DIR) \
|
||||
--extern foobar=$(TMPDIR)/libfoobar.rmeta \
|
||||
-Z unstable-options \
|
||||
--scrape-examples-output-path $@ \
|
||||
--scrape-examples-target-crate foobar
|
||||
|
||||
$(TMPDIR)/lib%.rmeta: src/lib.rs
|
||||
$(RUSTC) src/lib.rs --crate-name $* --crate-type lib --emit=metadata
|
@ -0,0 +1,4 @@
|
||||
fn main() {
|
||||
foobar::ok();
|
||||
foobar::ok();
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
fn main() {
|
||||
foobar::ok();
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
// @has foobar/fn.ok.html '//*[@class="prev"]' ''
|
||||
// @has foobar/fn.ok.html '//*[@class="more-scraped-examples"]' ''
|
||||
|
||||
pub fn ok() {}
|
Loading…
Reference in New Issue
Block a user