Skip to content

Commit 0fd4665

Browse files
authored
Merge pull request #1316 from 1c-syntax/feature/fixServerCached
fix CommonModuleNameCached
2 parents b51c1ce + 3e2471a commit 0fd4665

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-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 = "повнорноеиспользование|повтисп|сached";
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: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,25 @@ void testNegative() {
114114

115115
}
116116

117+
@Test
118+
void testEngName() {
119+
120+
getDocumentContextFromFile();
121+
122+
// given
123+
when(module.getName()).thenReturn("ModuleCached");
124+
when(module.getReturnValuesReuse()).thenReturn(ReturnValueReuse.DURING_REQUEST);
125+
126+
when(documentContext.getMdObject()).thenReturn(Optional.of(module));
127+
128+
// when
129+
List<Diagnostic> diagnostics = diagnosticInstance.getDiagnostics(documentContext);
130+
131+
//then
132+
assertThat(diagnostics).hasSize(0);
133+
134+
}
135+
117136

118137
@Test
119138
void testEmptyFile() {

0 commit comments

Comments
 (0)