File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed
tests/run-make/rustdoc-test-args Expand file tree Collapse file tree 2 files changed +24
-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
+ extern crate run_make_support;
2
+
3
+ use run_make_support:: { out_dir, rustdoc} ;
4
+ use std:: { fs, iter} ;
5
+ use std:: path:: Path ;
6
+
7
+ fn generate_a_lot_of_cfgs ( path : & Path ) {
8
+ let content = iter:: repeat ( "--cfg=a\n " ) . take ( 75_000 ) . collect :: < String > ( ) ;
9
+ fs:: write ( path, content. as_bytes ( ) ) . expect ( "failed to create args file" ) ;
10
+ }
11
+
12
+ fn main ( ) -> Result < ( ) , ( ) > {
13
+ let arg_file = out_dir ( ) . join ( "args" ) ;
14
+ generate_a_lot_of_cfgs ( & arg_file) ;
15
+
16
+ let arg_file = format ! ( "@{}" , arg_file. display( ) ) ;
17
+ if !rustdoc ( ) . arg ( "--test" ) . arg ( & arg_file) . arg ( "foo.rs" ) . run ( ) . status . success ( ) {
18
+ return Err ( ( ) ) ;
19
+ }
20
+ Ok ( ( ) )
21
+ }
You can’t perform that action at this time.
0 commit comments