Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

relax rustdoc tests #4451

Merged
merged 1 commit into from
Aug 30, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions tests/rustdoc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ fn rustdoc_args() {
"#)
.file("src/lib.rs", r#" "#);

assert_that(p.cargo_process("rustdoc").arg("-v").arg("--").arg("--no-defaults"),
assert_that(p.cargo_process("rustdoc").arg("-v").arg("--").arg("--cfg=foo"),
execs()
.with_status(0)
.with_stderr(format!("\
[DOCUMENTING] foo v0.0.1 ({url})
[RUNNING] `rustdoc --crate-name foo src[/]lib.rs \
-o {dir}[/]target[/]doc \
--no-defaults \
--cfg=foo \
-L dependency={dir}[/]target[/]debug[/]deps`
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
", dir = p.root().display(), url = p.url())));
Expand Down Expand Up @@ -81,7 +81,7 @@ fn rustdoc_foo_with_bar_dependency() {
"#);
bar.build();

assert_that(foo.cargo_process("rustdoc").arg("-v").arg("--").arg("--no-defaults"),
assert_that(foo.cargo_process("rustdoc").arg("-v").arg("--").arg("--cfg=foo"),
execs()
.with_status(0)
.with_stderr(format!("\
Expand All @@ -90,7 +90,7 @@ fn rustdoc_foo_with_bar_dependency() {
[DOCUMENTING] foo v0.0.1 ({url})
[RUNNING] `rustdoc --crate-name foo src[/]lib.rs \
-o {dir}[/]target[/]doc \
--no-defaults \
--cfg=foo \
-L dependency={dir}[/]target[/]debug[/]deps \
--extern [..]`
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
Expand Down Expand Up @@ -128,14 +128,14 @@ fn rustdoc_only_bar_dependency() {
bar.build();

assert_that(foo.cargo_process("rustdoc").arg("-v").arg("-p").arg("bar")
.arg("--").arg("--no-defaults"),
.arg("--").arg("--cfg=foo"),
execs()
.with_status(0)
.with_stderr(format!("\
[DOCUMENTING] bar v0.0.1 ([..])
[RUNNING] `rustdoc --crate-name bar [..]bar[/]src[/]lib.rs \
-o {dir}[/]target[/]doc \
--no-defaults \
--cfg=foo \
-L dependency={dir}[/]target[/]debug[/]deps`
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
", dir = foo.root().display())));
Expand All @@ -157,7 +157,7 @@ fn rustdoc_same_name_err() {
.file("src/lib.rs", r#" "#);

assert_that(p.cargo_process("rustdoc").arg("-v")
.arg("--").arg("--no-defaults"),
.arg("--").arg("--cfg=foo"),
execs()
.with_status(101)
.with_stderr("[ERROR] cannot document a package where a library and a \
Expand Down