Skip to content

Commit 0090129

Browse files
committed
ПовторноеИспользование typo
1 parent cadca0b commit 0090129

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

src/main/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/CommonModuleNameCachedDiagnostic.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
)
4747
public class CommonModuleNameCachedDiagnostic extends AbstractCommonModuleNameDiagnostic {
4848

49-
private static final String REGEXP = "повнорноеиспользование|повтисп|cached";
49+
private static final String REGEXP = "повторноеиспользование|повтисп|cached";
5050

5151
public CommonModuleNameCachedDiagnostic() {
5252
super(REGEXP);

src/test/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/CommonModuleNameCachedDiagnosticTest.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,24 @@ void testEngName() {
133133

134134
}
135135

136+
@Test
137+
void testLongName() {
138+
139+
getDocumentContextFromFile();
140+
141+
// given
142+
when(module.getName()).thenReturn("ModuleПовторноеИспользование");
143+
when(module.getReturnValuesReuse()).thenReturn(ReturnValueReuse.DURING_REQUEST);
144+
145+
when(documentContext.getMdObject()).thenReturn(Optional.of(module));
146+
147+
// when
148+
List<Diagnostic> diagnostics = diagnosticInstance.getDiagnostics(documentContext);
149+
150+
//then
151+
assertThat(diagnostics).hasSize(0);
152+
153+
}
136154

137155
@Test
138156
void testEmptyFile() {

0 commit comments

Comments
 (0)