Skip to content

Commit 7ffa09a

Browse files
committed
test(docs): Show verbose behavior
1 parent d8bf778 commit 7ffa09a

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

tests/testsuite/doc.rs

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1194,6 +1194,38 @@ fn doc_all_workspace() {
11941194
.run();
11951195
}
11961196

1197+
#[cargo_test]
1198+
fn doc_all_workspace_verbose() {
1199+
let p = project()
1200+
.file(
1201+
"Cargo.toml",
1202+
r#"
1203+
[package]
1204+
name = "foo"
1205+
version = "0.1.0"
1206+
edition = "2015"
1207+
1208+
[dependencies]
1209+
bar = { path = "bar" }
1210+
1211+
[workspace]
1212+
"#,
1213+
)
1214+
.file("src/main.rs", "fn main() {}")
1215+
.file("bar/Cargo.toml", &basic_manifest("bar", "0.1.0"))
1216+
.file("bar/src/lib.rs", "pub fn bar() {}")
1217+
.build();
1218+
1219+
// The order in which bar is compiled or documented is not deterministic
1220+
p.cargo("doc --workspace -v")
1221+
.with_stderr_contains("[DOCUMENTING] bar v0.1.0 ([..])")
1222+
.with_stderr_contains("[CHECKING] bar v0.1.0 ([..])")
1223+
.with_stderr_contains("[DOCUMENTING] foo v0.1.0 ([..])")
1224+
.with_stderr_contains("[GENERATED] [CWD]/target/doc/bar/index.html")
1225+
.with_stderr_contains("[GENERATED] [CWD]/target/doc/foo/index.html")
1226+
.run();
1227+
}
1228+
11971229
#[cargo_test]
11981230
fn doc_all_virtual_manifest() {
11991231
let p = project()

0 commit comments

Comments
 (0)