Skip to content

Commit 62f800f

Browse files
committed
Auto merge of #4451 - steveklabnik:relax-rustdoc-tests, r=alexcrichton
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.
2 parents b524682 + b1e8298 commit 62f800f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tests/rustdoc.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ fn rustdoc_args() {
3838
"#)
3939
.file("src/lib.rs", r#" "#);
4040

41-
assert_that(p.cargo_process("rustdoc").arg("-v").arg("--").arg("--no-defaults"),
41+
assert_that(p.cargo_process("rustdoc").arg("-v").arg("--").arg("--cfg=foo"),
4242
execs()
4343
.with_status(0)
4444
.with_stderr(format!("\
4545
[DOCUMENTING] foo v0.0.1 ({url})
4646
[RUNNING] `rustdoc --crate-name foo src[/]lib.rs \
4747
-o {dir}[/]target[/]doc \
48-
--no-defaults \
48+
--cfg=foo \
4949
-L dependency={dir}[/]target[/]debug[/]deps`
5050
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
5151
", dir = p.root().display(), url = p.url())));
@@ -81,7 +81,7 @@ fn rustdoc_foo_with_bar_dependency() {
8181
"#);
8282
bar.build();
8383

84-
assert_that(foo.cargo_process("rustdoc").arg("-v").arg("--").arg("--no-defaults"),
84+
assert_that(foo.cargo_process("rustdoc").arg("-v").arg("--").arg("--cfg=foo"),
8585
execs()
8686
.with_status(0)
8787
.with_stderr(format!("\
@@ -90,7 +90,7 @@ fn rustdoc_foo_with_bar_dependency() {
9090
[DOCUMENTING] foo v0.0.1 ({url})
9191
[RUNNING] `rustdoc --crate-name foo src[/]lib.rs \
9292
-o {dir}[/]target[/]doc \
93-
--no-defaults \
93+
--cfg=foo \
9494
-L dependency={dir}[/]target[/]debug[/]deps \
9595
--extern [..]`
9696
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
@@ -128,14 +128,14 @@ fn rustdoc_only_bar_dependency() {
128128
bar.build();
129129

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

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

0 commit comments

Comments
 (0)