File tree Expand file tree Collapse file tree 1 file changed +0
-72
lines changed Expand file tree Collapse file tree 1 file changed +0
-72
lines changed Original file line number Diff line number Diff line change @@ -3583,76 +3583,4 @@ mod tests {
3583
3583
matches!( config. flycheck( None ) , FlycheckConfig :: CargoCommand { options, .. } if options. target_dir == Some ( Utf8PathBuf :: from( "other_folder" ) ) )
3584
3584
) ;
3585
3585
}
3586
-
3587
- #[ test]
3588
- fn toml_unknown_key ( ) {
3589
- let config =
3590
- Config :: new ( AbsPathBuf :: assert ( project_root ( ) ) , Default :: default ( ) , vec ! [ ] , None ) ;
3591
-
3592
- let mut change = ConfigChange :: default ( ) ;
3593
-
3594
- change. change_user_config ( Some (
3595
- toml:: toml! {
3596
- [ cargo. cfgs]
3597
- these = "these"
3598
- should = "should"
3599
- be = "be"
3600
- valid = "valid"
3601
-
3602
- [ invalid. config]
3603
- err = "error"
3604
-
3605
- [ cargo]
3606
- target = "ok"
3607
-
3608
- // FIXME: This should be an error
3609
- [ cargo. sysroot]
3610
- non-table = "expected"
3611
- }
3612
- . to_string ( )
3613
- . into ( ) ,
3614
- ) ) ;
3615
-
3616
- let ( config, e, _) = config. apply_change ( change) ;
3617
- expect_test:: expect![ [ r#"
3618
- ConfigErrors(
3619
- [
3620
- Toml {
3621
- config_key: "invalid/config/err",
3622
- error: Error {
3623
- inner: Error {
3624
- inner: TomlError {
3625
- message: "unexpected field",
3626
- raw: None,
3627
- keys: [],
3628
- span: None,
3629
- },
3630
- },
3631
- },
3632
- },
3633
- ],
3634
- )
3635
- "# ] ]
3636
- . assert_debug_eq ( & e) ;
3637
- let mut change = ConfigChange :: default ( ) ;
3638
-
3639
- change. change_user_config ( Some (
3640
- toml:: toml! {
3641
- [ cargo. cfgs]
3642
- these = "these"
3643
- should = "should"
3644
- be = "be"
3645
- valid = "valid"
3646
- }
3647
- . to_string ( )
3648
- . into ( ) ,
3649
- ) ) ;
3650
- let ( _, e, _) = config. apply_change ( change) ;
3651
- expect_test:: expect![ [ r#"
3652
- ConfigErrors(
3653
- [],
3654
- )
3655
- "# ] ]
3656
- . assert_debug_eq ( & e) ;
3657
- }
3658
3586
}
You can’t perform that action at this time.
0 commit comments