File tree 2 files changed +6
-39
lines changed
2 files changed +6
-39
lines changed Original file line number Diff line number Diff line change @@ -437,45 +437,6 @@ fn no_cross_doctests() {
437
437
. run ( ) ;
438
438
}
439
439
440
- #[ cargo_test]
441
- fn cross_doctests ( ) {
442
- if cross_compile:: disabled ( ) || !cross_compile:: can_run_on_host ( ) || !is_nightly ( ) {
443
- return ;
444
- }
445
-
446
- let p = project ( )
447
- . file (
448
- "src/lib.rs" ,
449
- r#"
450
- //! ```
451
- //! extern crate foo;
452
- //! assert!(true);
453
- //! ```
454
- "# ,
455
- )
456
- . build ( ) ;
457
-
458
- let target = cross_compile:: alternate ( ) ;
459
-
460
- // This tests the library and runs the doc tests.
461
- p. cargo ( "test -v -Z doctest-xcompile --target" )
462
- . arg ( & target)
463
- . masquerade_as_nightly_cargo ( )
464
- . with_stderr ( & format ! (
465
- "\
466
- [COMPILING] foo v0.0.1 ([CWD])
467
- [RUNNING] `rustc --crate-name foo [..]
468
- [RUNNING] `rustc --crate-name foo [..]--test[..]
469
- [FINISHED] test [unoptimized + debuginfo] target(s) in [..]
470
- [RUNNING] `[CWD]/target/{triple}/debug/deps/foo-[..][EXE]`
471
- [DOCTEST] foo
472
- [RUNNING] `rustdoc [..]
473
- " ,
474
- triple = target
475
- ) )
476
- . run ( ) ;
477
- }
478
-
479
440
#[ cargo_test]
480
441
fn simple_cargo_run ( ) {
481
442
if !cross_compile:: can_run_on_host ( ) {
Original file line number Diff line number Diff line change @@ -51,6 +51,12 @@ fn custom_target_minimal() {
51
51
p. cargo ( "build --lib --target custom-target.json -v" ) . run ( ) ;
52
52
p. cargo ( "build --lib --target src/../custom-target.json -v" )
53
53
. run ( ) ;
54
+
55
+ // Ensure that the correct style of flag is passed to --target with doc tests.
56
+ p. cargo ( "test --doc --target src/../custom-target.json -v -Zdoctest-xcompile" )
57
+ . masquerade_as_nightly_cargo ( )
58
+ . with_stderr_contains ( "[RUNNING] `rustdoc [..]--target [..]foo/custom-target.json[..]" )
59
+ . run ( ) ;
54
60
}
55
61
56
62
#[ cargo_test]
You can’t perform that action at this time.
0 commit comments