Skip to content

Commit 9e4958a

Browse files
committed
Add test for prev/back arrows + examples across multiple files
1 parent f10dcee commit 9e4958a

File tree

4 files changed

+32
-0
lines changed

4 files changed

+32
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
-include ../../run-make-fulldeps/tools.mk
2+
3+
OUTPUT_DIR := "$(TMPDIR)/rustdoc"
4+
5+
all: $(TMPDIR)/ex.calls $(TMPDIR)/ex2.calls
6+
$(RUSTDOC) src/lib.rs --crate-name foobar --crate-type lib --output $(OUTPUT_DIR) \
7+
-Z unstable-options \
8+
--with-examples $(TMPDIR)/ex.calls \
9+
--with-examples $(TMPDIR)/ex2.calls
10+
11+
$(HTMLDOCCK) $(OUTPUT_DIR) src/lib.rs
12+
13+
$(TMPDIR)/%.calls: $(TMPDIR)/libfoobar.rmeta
14+
$(RUSTDOC) examples/$*.rs --crate-name $* --crate-type bin --output $(OUTPUT_DIR) \
15+
--extern foobar=$(TMPDIR)/libfoobar.rmeta \
16+
-Z unstable-options \
17+
--scrape-examples-output-path $@ \
18+
--scrape-examples-target-crate foobar
19+
20+
$(TMPDIR)/lib%.rmeta: src/lib.rs
21+
$(RUSTC) src/lib.rs --crate-name $* --crate-type lib --emit=metadata
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
fn main() {
2+
foobar::ok();
3+
foobar::ok();
4+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fn main() {
2+
foobar::ok();
3+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// @has foobar/fn.ok.html '//*[@class="prev"]' ''
2+
// @has foobar/fn.ok.html '//*[@class="more-scraped-examples"]' ''
3+
4+
pub fn ok() {}

0 commit comments

Comments
 (0)