mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
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:
@@ -3,4 +3,4 @@ def f():
|
||||
a = 1
|
||||
else:
|
||||
a = 2
|
||||
#comment <caret>
|
||||
#comment <caret>
|
||||
|
||||
@@ -14,4 +14,4 @@ class ThisIsATest():
|
||||
# <editor-fold desc="Description">
|
||||
def another_four(self):
|
||||
print "Hello, world!"
|
||||
# </editor-fold>
|
||||
# </editor-fold>
|
||||
@@ -8,4 +8,4 @@ class C:
|
||||
|
||||
def m3(self):
|
||||
pass
|
||||
# </editor-fold>
|
||||
# </editor-fold>
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user