Skip to content

Commit

Permalink
Auto merge of #4451 - steveklabnik:relax-rustdoc-tests, r=alexcrichton
Browse files Browse the repository at this point in the history
relax rustdoc tests

This was asserting on the output directly, rather than just what it contains.

In rust-lang/rust#44138 we are adding deprecations, and so it
breaks these tests.
  • Loading branch information
bors committed Aug 30, 2017
2 parents b524682 + b1e8298 commit 62f800f
Showing 1 changed file with 7 additions and 7 deletions.
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

0 comments on commit 62f800f

Please sign in to comment.