@@ -68,14 +68,18 @@ void testFileVarContentFromDirectFile_NoComments() {
6868
6969 var blocks = Arrays .asList (content .split ("---\n ?" ));
7070
71- assertThat (blocks ).hasSize (2 );
71+ assertThat (blocks ).hasSize (3 );
7272 assertThat (blocks .get (0 )).isEqualTo ("""
7373 ```bsl
7474 Перем ИмяБезОписания
7575 ```
7676
7777 """ );
78- assertThat (blocks .get (1 )).matches ("""
78+ assertThat (blocks .get (1 )).isEqualTo ("""
79+ Переменная уровня модуля
80+
81+ """ );
82+ assertThat (blocks .get (2 )).matches ("""
7983 \\ [file://.*/src/test/resources/hover/variableSymbolMarkupContentBuilder.bsl]\\ (.*src/test/resources/hover/variableSymbolMarkupContentBuilder.bsl#\\ d+\\ )
8084
8185 """ );
@@ -95,18 +99,22 @@ void testFileVarContentFromDirectFile_OneCommentsStringFromRight() {
9599
96100 var blocks = Arrays .asList (content .split ("---\n ?" ));
97101
98- assertThat (blocks ).hasSize (3 );
102+ assertThat (blocks ).hasSize (4 );
99103 assertThat (blocks .get (0 )).isEqualTo ("""
100104 ```bsl
101105 Перем Имя_ОписаниеСправаОднойСтрокой
102106 ```
103107
104108 """ );
105- assertThat (blocks .get (1 )).matches ("""
106- \\ [file://.*/src/test/resources/hover/variableSymbolMarkupContentBuilder.bsl] \\ (.*src/test/resources/hover/variableSymbolMarkupContentBuilder.bsl# \\ d+ \\ )
109+ assertThat (blocks .get (1 )).isEqualTo ("""
110+ Переменная уровня модуля
107111
108112 """ );
109113 assertThat (blocks .get (2 )).matches ("""
114+ \\ [file://.*/src/test/resources/hover/variableSymbolMarkupContentBuilder.bsl]\\ (.*src/test/resources/hover/variableSymbolMarkupContentBuilder.bsl#\\ d+\\ )
115+
116+ """ );
117+ assertThat (blocks .get (3 )).matches ("""
110118 описание
111119
112120 """ );
@@ -127,19 +135,23 @@ void testMethodVarContentFromDirectFile_2_comments_strings() {
127135
128136 var blocks = Arrays .asList (content .split ("---\n ?" ));
129137
130- assertThat (blocks ).hasSize (3 );
138+ assertThat (blocks ).hasSize (4 );
131139 assertThat (blocks .get (0 )).isEqualTo ("""
132140 ```bsl
133141 Перем Имя_ОписаниеСверхуДвеСтроки_Функция
134142 ```
135143
136144 """ );
137- assertThat (blocks .get (1 )).matches ("""
145+ assertThat (blocks .get (1 )).isEqualTo ("""
146+ Локальная переменная метода ИмяФункции
147+
148+ """ );
149+ assertThat (blocks .get (2 )).matches ("""
138150 \\ [file://.*/src/test/resources/hover/variableSymbolMarkupContentBuilder.bsl.ИмяФункции]\\ (.*src/test/resources/hover/variableSymbolMarkupContentBuilder.bsl#\\ d+\\ )
139151
140152 """ );
141153 // TODO баг - нет \n для многострочного описания переменной
142- assertThat (blocks .get (2 )).matches ("""
154+ assertThat (blocks .get (3 )).matches ("""
143155 описание 1 строка
144156 2 строка
145157
@@ -161,18 +173,22 @@ void testMethodVarContentFromDirectFile_3_comments_strings() {
161173
162174 var blocks = Arrays .asList (content .split ("---\n ?" ));
163175
164- assertThat (blocks ).hasSize (3 );
176+ assertThat (blocks ).hasSize (4 );
165177 assertThat (blocks .get (0 )).isEqualTo ("""
166178 ```bsl
167179 Перем Имя_ОписаниеСверхуТриСтрокиПоследняяПустая_Функция
168180 ```
169181
170182 """ );
171- assertThat (blocks .get (1 )).matches ("""
172- \\ [file://.*/src/test/resources/hover/variableSymbolMarkupContentBuilder.bsl. ИмяФункции] \\ (.*src/test/resources/hover/variableSymbolMarkupContentBuilder.bsl# \\ d+ \\ )
183+ assertThat (blocks .get (1 )).isEqualTo ("""
184+ Локальная переменная метода ИмяФункции
173185
174186 """ );
175187 assertThat (blocks .get (2 )).matches ("""
188+ \\ [file://.*/src/test/resources/hover/variableSymbolMarkupContentBuilder.bsl.ИмяФункции]\\ (.*src/test/resources/hover/variableSymbolMarkupContentBuilder.bsl#\\ d+\\ )
189+
190+ """ );
191+ assertThat (blocks .get (3 )).matches ("""
176192 описание 1 строка
177193 2 строка
178194
@@ -195,14 +211,18 @@ void testContentFromObjectModule() {
195211
196212 var blocks = Arrays .asList (content .split ("---\n ?" ));
197213
198- assertThat (blocks ).hasSize (2 );
214+ assertThat (blocks ).hasSize (3 );
199215 assertThat (blocks .get (0 )).isEqualTo ("""
200216 ```bsl
201217 Перем ВалютаУчета
202218 ```
203219
204220 """ );
205- assertThat (blocks .get (1 )).matches ("\\ [Catalog.Справочник1]\\ (.*Catalogs/.*/Ext/ObjectModule.bsl#\\ d+\\ )\n \n " );
221+ assertThat (blocks .get (1 )).isEqualTo ("""
222+ Переменная уровня модуля
223+
224+ """ );
225+ assertThat (blocks .get (2 )).matches ("\\ [Catalog.Справочник1]\\ (.*Catalogs/.*/Ext/ObjectModule.bsl#\\ d+\\ )\n \n " );
206226 }
207227
208228}
0 commit comments