File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -742,3 +742,36 @@ Caused by:
742742 )
743743 . run ( ) ;
744744}
745+
746+ #[ cargo_test( nightly, reason = "debug options stabilized in 1.70" ) ]
747+ fn debug_options_valid ( ) {
748+ for ( option, cli) in [
749+ ( "line-directives-only" , "line-directives-only" ) ,
750+ ( "line-tables-only" , "line-tables-only" ) ,
751+ ( "none" , "0" ) ,
752+ ( "limited" , "1" ) ,
753+ ( "full" , "2" ) ,
754+ ] {
755+ let p = project ( )
756+ . file (
757+ "Cargo.toml" ,
758+ & format ! (
759+ r#"
760+ [package]
761+ name = "foo"
762+ authors = []
763+ version = "0.0.0"
764+
765+ [profile.dev]
766+ debug = "{option}"
767+ "#
768+ ) ,
769+ )
770+ . file ( "src/main.rs" , "fn main() {}" )
771+ . build ( ) ;
772+
773+ p. cargo ( "build -v" )
774+ . with_stderr_contains ( & format ! ( "[RUNNING] `rustc [..]-C debuginfo={cli} [..]" ) )
775+ . run ( ) ;
776+ }
777+ }
You can’t perform that action at this time.
0 commit comments