PY-17017 Fix existing test data

The new way to handle trailing line comments that includes them into the
proper block (statement list) depending on their indentation affected
the behavior of "Surround with custom folding region" that previously
either over-indented the closing comment or under-indented it
(see PY-14358). Now these comments always stick to the first column,
since CustomFoldingSurroundDescriptor inserts them without any
indentation at all, and hence they are consistently recognized as
children of the containing PSI file node itself.

Now it's finally possible to fix that issue for good.
This commit is contained in:
Mikhail Golubev
2017-09-21 20:19:01 +03:00
parent be3e4ba742
commit f6a325b3de
4 changed files with 5 additions and 5 deletions

View File

@@ -3,4 +3,4 @@ def f():
a = 1
else:
a = 2
#comment <caret>
#comment <caret>

View File

@@ -14,4 +14,4 @@ class ThisIsATest():
# <editor-fold desc="Description">
def another_four(self):
print "Hello, world!"
# </editor-fold>
# </editor-fold>

View File

@@ -8,4 +8,4 @@ class C:
def m3(self):
pass
# </editor-fold>
# </editor-fold>

View File

@@ -211,8 +211,8 @@ public class PythonLexerTest extends PyLexerTestCase {
"def foo(sender):\n" +
" pass",
"Py:CLASS_KEYWORD", "Py:SPACE", "Py:IDENTIFIER", "Py:COLON", "Py:STATEMENT_BREAK", "Py:LINE_BREAK",
"Py:INDENT", "Py:PASS_KEYWORD", "Py:STATEMENT_BREAK", "Py:LINE_BREAK",
"Py:DEDENT", "Py:END_OF_LINE_COMMENT", "Py:LINE_BREAK",
"Py:INDENT", "Py:PASS_KEYWORD", "Py:STATEMENT_BREAK",
"Py:DEDENT", "Py:LINE_BREAK", "Py:END_OF_LINE_COMMENT", "Py:LINE_BREAK",
"Py:DEF_KEYWORD", "Py:SPACE", "Py:IDENTIFIER", "Py:LPAR", "Py:IDENTIFIER", "Py:RPAR", "Py:COLON", "Py:STATEMENT_BREAK", "Py:LINE_BREAK",
"Py:INDENT", "Py:PASS_KEYWORD", "Py:STATEMENT_BREAK");
}