Skip to content

Commit 43873db

Browse files
committed
test(rustdoc): show the wrong --emit precedence
It should have the same behavior as rustc, which the last wins.
1 parent a2c8b0b commit 43873db

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,17 @@ fn main() {
3333
// Now we check that we can provide a file name to the `dep-info` argument.
3434
rustdoc().input("lib.rs").arg("-Zunstable-options").emit("dep-info=bla.d").run();
3535
assert!(path("bla.d").exists());
36+
37+
// The last emit-type wins. The same behavior as rustc.
38+
// TODO: this shows the wrong behavior as a MRE, which will be fixed in the next commit
39+
rustdoc()
40+
.input("lib.rs")
41+
.arg("-Zunstable-options")
42+
.emit("dep-info=precedence1.d")
43+
.emit("dep-info=precedence2.d")
44+
.emit("dep-info=precedence3.d")
45+
.run();
46+
assert!(path("precedence1.d").exists());
47+
assert!(!path("precedence2.d").exists());
48+
assert!(!path("precedence3.d").exists());
3649
}

0 commit comments

Comments
 (0)