Skip to content

Commit e93b40b

Browse files
Copilotnixel2007
andcommitted
Add test to verify см. references don't create document links
Co-authored-by: nixel2007 <1132840+nixel2007@users.noreply.github.com>
1 parent 0b23e11 commit e93b40b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/test/java/com/github/_1c_syntax/bsl/languageserver/documentlink/DescriptionDocumentLinkSupplierTest.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,17 @@ void testEmptyDescriptions() {
8383
// then - should have no links from descriptions
8484
assertThat(documentLinks).isEmpty();
8585
}
86+
87+
@Test
88+
void testNoUrlsInDescriptionsWithReferences() {
89+
// given - file with "см." references but no HTTP/HTTPS/FTP URLs
90+
var filePath = "./src/test/resources/context/symbol/MethodDescription.bsl";
91+
var documentContext = TestUtils.getDocumentContextFromFile(filePath);
92+
93+
// when
94+
var documentLinks = supplier.getDocumentLinks(documentContext);
95+
96+
// then - should have no links because "см." references are not URLs
97+
assertThat(documentLinks).isEmpty();
98+
}
8699
}

0 commit comments

Comments
 (0)