File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed
tests/run-make/rustdoc-test-builder Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change 1+ //! ```
2+ //! let x = 12;
3+ //! ```
Original file line number Diff line number Diff line change 1+ // This test ensures that if the rustdoc test binary is not executable, it will
2+ // gracefully fail and not panic.
3+
4+ //@ needs-target-std
5+
6+ use run_make_support:: { path, rfs, rustdoc} ;
7+
8+ fn main ( ) {
9+ let absolute_path = path ( "foo.rs" ) . canonicalize ( ) . expect ( "failed to get absolute path" ) ;
10+ let output = rustdoc ( )
11+ . input ( "foo.rs" )
12+ . arg ( "--test" )
13+ . arg ( "-Zunstable-options" )
14+ . arg ( "--test-builder" )
15+ . arg ( & absolute_path)
16+ . run_fail ( ) ;
17+
18+ output. assert_stdout_contains ( "Failed to run compiler: " ) ;
19+ output. assert_stderr_not_contains ( "the compiler unexpectedly panicked. this is a bug." ) ;
20+ // Just in case...
21+ output. assert_stdout_not_contains ( "the compiler unexpectedly panicked. this is a bug." ) ;
22+ }
You can’t perform that action at this time.
0 commit comments