Skip to content

Commit 0abea28

Browse files
committed
test(rustdoc): depinfo cannot be emitted to stdout
This commit demonstrates that `rustdoc --emit=depinfo=-` hasn't yet supported emitting to stdout.
1 parent 235a4c0 commit 0abea28

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/run-make/rustdoc-dep-info/rmake.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,15 @@ fn main() {
4545
assert!(!path("precedence1.d").exists());
4646
assert!(!path("precedence2.d").exists());
4747
assert!(path("precedence3.d").exists());
48+
49+
// stdout (-) also wins if being the last.
50+
let result = rustdoc()
51+
.input("lib.rs")
52+
.arg("-Zunstable-options")
53+
.emit("dep-info=precedence1.d")
54+
.emit("dep-info=-")
55+
.run();
56+
assert!(!path("precedence1.d").exists());
57+
assert!(path("-").exists()); // `-` be treated as a file path
58+
assert!(result.stdout().is_empty()); // Nothing emitted to stdout
4859
}

0 commit comments

Comments
 (0)