diff options
Diffstat (limited to 'crates/ide')
-rw-r--r-- | crates/ide/src/diagnostics.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/crates/ide/src/diagnostics.rs b/crates/ide/src/diagnostics.rs index 3ad30f0c9..b2714cb69 100644 --- a/crates/ide/src/diagnostics.rs +++ b/crates/ide/src/diagnostics.rs | |||
@@ -895,4 +895,17 @@ impl TestStruct { | |||
895 | "#, | 895 | "#, |
896 | ); | 896 | ); |
897 | } | 897 | } |
898 | |||
899 | #[test] | ||
900 | fn test_single_incorrect_case_diagnostic_in_function_name_issue_6970() { | ||
901 | let input = r#"fn FOO<|>() {}"#; | ||
902 | let expected = r#"fn foo() {}"#; | ||
903 | |||
904 | let (analysis, file_position) = fixture::position(input); | ||
905 | let diagnostics = | ||
906 | analysis.diagnostics(&DiagnosticsConfig::default(), file_position.file_id).unwrap(); | ||
907 | assert_eq!(diagnostics.len(), 1); | ||
908 | |||
909 | check_fixes(input, expected); | ||
910 | } | ||
898 | } | 911 | } |