Merge pull request #1760 from pietroalbini/pa-fix-diagnostic

Fix expected diagnostic for crate name typo
This commit is contained in:
Igor Matuszewski 2022-01-15 17:23:57 +01:00 committed by GitHub
commit bc54c5759a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -679,7 +679,9 @@ fn client_dependency_typo_and_fix() {
let diag = rls.wait_for_diagnostics();
assert_eq!(diag.diagnostics.len(), 1);
assert_eq!(diag.diagnostics[0].severity, Some(DiagnosticSeverity::Error));
assert!(diag.diagnostics[0].message.contains("no matching package named `auto-cfg`"));
assert!(diag.diagnostics[0]
.message
.contains("no matching package found\nsearched package name: `auto-cfg`"));
let change_manifest = |contents: &str| {
std::fs::write(root_path.join("Cargo.toml"), contents).unwrap();