diff --git a/tests/run-make/rustdoc-dep-info/rmake.rs b/tests/run-make/rustdoc-dep-info/rmake.rs index 166e8d5702fc..2c37f1d5e237 100644 --- a/tests/run-make/rustdoc-dep-info/rmake.rs +++ b/tests/run-make/rustdoc-dep-info/rmake.rs @@ -45,4 +45,15 @@ fn main() { assert!(!path("precedence1.d").exists()); assert!(!path("precedence2.d").exists()); assert!(path("precedence3.d").exists()); + + // stdout (-) also wins if being the last. + let result = rustdoc() + .input("lib.rs") + .arg("-Zunstable-options") + .emit("dep-info=precedence1.d") + .emit("dep-info=-") + .run(); + assert!(!path("precedence1.d").exists()); + assert!(path("-").exists()); // `-` be treated as a file path + assert!(result.stdout().is_empty()); // Nothing emitted to stdout }