Skip to content

Commit ba2b250

Browse files
committed
test: pass --target to rustdoc even if specified with host target
1 parent 1f0d328 commit ba2b250

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

tests/testsuite/cross_compile.rs

+19-3
Original file line numberDiff line numberDiff line change
@@ -592,17 +592,33 @@ fn no_cross_doctests() {
592592

593593
println!("b");
594594
let target = rustc_host();
595-
p.cargo("test --target")
595+
p.cargo("test -v --target")
596596
.arg(&target)
597597
.with_stderr(&format!(
598598
"\
599599
[COMPILING] foo v0.0.1 ([CWD])
600+
[RUNNING] `rustc --crate-name foo [..]
601+
[RUNNING] `rustc --crate-name foo [..]--test[..]
600602
[FINISHED] test [unoptimized + debuginfo] target(s) in [..]
601-
[RUNNING] [..] (target/{triple}/debug/deps/foo-[..][EXE])
603+
[RUNNING] `[CWD]/target/{target}/debug/deps/foo-[..][EXE]`
602604
[DOCTEST] foo
605+
[RUNNING] `rustdoc [..]--target {target}[..]`
603606
",
604-
triple = target
605607
))
608+
.with_stdout(
609+
"
610+
running 0 tests
611+
612+
test result: ok. 0 passed[..]
613+
614+
615+
running 1 test
616+
test src/lib.rs - (line 2) ... ok
617+
618+
test result: ok. 1 passed[..]
619+
620+
",
621+
)
606622
.run();
607623

608624
println!("c");

0 commit comments

Comments
 (0)