mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-10 07:04:22 +00:00
Remove invalid tests
This commit is contained in:
parent
23eb20794e
commit
987a9342ad
1 changed files with 0 additions and 72 deletions
|
@ -3585,76 +3585,4 @@ mod tests {
|
|||
matches!(config.flycheck(None), FlycheckConfig::CargoCommand { options, .. } if options.target_dir == Some(Utf8PathBuf::from("other_folder")))
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn toml_unknown_key() {
|
||||
let config =
|
||||
Config::new(AbsPathBuf::assert(project_root()), Default::default(), vec![], None);
|
||||
|
||||
let mut change = ConfigChange::default();
|
||||
|
||||
change.change_user_config(Some(
|
||||
toml::toml! {
|
||||
[cargo.cfgs]
|
||||
these = "these"
|
||||
should = "should"
|
||||
be = "be"
|
||||
valid = "valid"
|
||||
|
||||
[invalid.config]
|
||||
err = "error"
|
||||
|
||||
[cargo]
|
||||
target = "ok"
|
||||
|
||||
// FIXME: This should be an error
|
||||
[cargo.sysroot]
|
||||
non-table = "expected"
|
||||
}
|
||||
.to_string()
|
||||
.into(),
|
||||
));
|
||||
|
||||
let (config, e, _) = config.apply_change(change);
|
||||
expect_test::expect![[r#"
|
||||
ConfigErrors(
|
||||
[
|
||||
Toml {
|
||||
config_key: "invalid/config/err",
|
||||
error: Error {
|
||||
inner: Error {
|
||||
inner: TomlError {
|
||||
message: "unexpected field",
|
||||
raw: None,
|
||||
keys: [],
|
||||
span: None,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
)
|
||||
"#]]
|
||||
.assert_debug_eq(&e);
|
||||
let mut change = ConfigChange::default();
|
||||
|
||||
change.change_user_config(Some(
|
||||
toml::toml! {
|
||||
[cargo.cfgs]
|
||||
these = "these"
|
||||
should = "should"
|
||||
be = "be"
|
||||
valid = "valid"
|
||||
}
|
||||
.to_string()
|
||||
.into(),
|
||||
));
|
||||
let (_, e, _) = config.apply_change(change);
|
||||
expect_test::expect![[r#"
|
||||
ConfigErrors(
|
||||
[],
|
||||
)
|
||||
"#]]
|
||||
.assert_debug_eq(&e);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue