Move /src/test to /tests
This commit is contained in:
parent
ca855e6e42
commit
cf2dff2b1e
27592 changed files with 0 additions and 0 deletions
5
tests/run-make/rustdoc-scrape-examples-multiple/Makefile
Normal file
5
tests/run-make/rustdoc-scrape-examples-multiple/Makefile
Normal file
|
@ -0,0 +1,5 @@
|
|||
deps := ex ex2
|
||||
|
||||
include ./scrape.mk
|
||||
|
||||
all: scrape
|
|
@ -0,0 +1,4 @@
|
|||
fn main() {
|
||||
foobar::ok();
|
||||
foobar::ok();
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fn main() {
|
||||
foobar::ok();
|
||||
}
|
21
tests/run-make/rustdoc-scrape-examples-multiple/scrape.mk
Normal file
21
tests/run-make/rustdoc-scrape-examples-multiple/scrape.mk
Normal file
|
@ -0,0 +1,21 @@
|
|||
include ../../run-make-fulldeps/tools.mk
|
||||
|
||||
OUTPUT_DIR := "$(TMPDIR)/rustdoc"
|
||||
|
||||
$(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 \
|
||||
$(extra_flags)
|
||||
|
||||
$(TMPDIR)/lib%.rmeta: src/lib.rs
|
||||
$(RUSTC) src/lib.rs --crate-name $* --crate-type lib --emit=metadata
|
||||
|
||||
scrape: $(foreach d,$(deps),$(TMPDIR)/$(d).calls)
|
||||
$(RUSTDOC) src/lib.rs --crate-name foobar --crate-type lib --output $(OUTPUT_DIR) \
|
||||
-Z unstable-options \
|
||||
$(foreach d,$(deps),--with-examples $(TMPDIR)/$(d).calls)
|
||||
|
||||
$(HTMLDOCCK) $(OUTPUT_DIR) src/lib.rs
|
|
@ -0,0 +1,6 @@
|
|||
// @has foobar/fn.ok.html '//*[@class="docblock scraped-example-list"]//*[@class="prev"]' ''
|
||||
// @has foobar/fn.ok.html '//*[@class="more-scraped-examples"]' ''
|
||||
// @has src/ex/ex.rs.html
|
||||
// @has foobar/fn.ok.html '//a[@href="../src/ex/ex.rs.html#2"]' ''
|
||||
|
||||
pub fn ok() {}
|
Loading…
Add table
Add a link
Reference in a new issue