Skip to content

Commit 987a934

Browse files
committed
Remove invalid tests
1 parent 23eb207 commit 987a934

File tree

1 file changed

+0
-72
lines changed

1 file changed

+0
-72
lines changed

crates/rust-analyzer/src/config.rs

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

0 commit comments

Comments
 (0)