mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-10972 Properly align elements of expressions without closing bracket on enter
instead of using artificially built indentation. It also covers all collection literals, comprehensions and glued string literals in parentheses most of which were overlooked in the previous implementation.
This commit is contained in:
@@ -365,7 +365,8 @@ public class PyEditingTest extends PyTestCase {
|
||||
public void testEndOfStringInParenth() {
|
||||
doTestEnter("print (\"foo\"<caret>\n" +
|
||||
" \"bar\")",
|
||||
"print (\"foo\"\n\n" +
|
||||
"print (\"foo\"\n" +
|
||||
" \n" +
|
||||
" \"bar\")");
|
||||
}
|
||||
|
||||
@@ -596,4 +597,49 @@ public class PyEditingTest extends PyTestCase {
|
||||
public void testIncompleteFunctionTypeComment() {
|
||||
doTypingTest('.');
|
||||
}
|
||||
|
||||
// PY-10972
|
||||
public void testEnterInIncompleteTupleLiteral() {
|
||||
doTypingTest("\n'baz'");
|
||||
}
|
||||
|
||||
// PY-10972
|
||||
public void testEnterInIncompleteListLiteral() {
|
||||
doTypingTest("\n'baz'");
|
||||
}
|
||||
|
||||
// PY-10972
|
||||
public void testEnterInIncompleteSetLiteral() {
|
||||
doTypingTest("\n'baz'");
|
||||
}
|
||||
|
||||
// PY-10972
|
||||
public void testEnterInIncompleteDictLiteral() {
|
||||
doTypingTest("\n'baz'");
|
||||
}
|
||||
|
||||
// PY-10972
|
||||
public void testEnterInIncompleteGluedStringLiteralInParentheses() {
|
||||
doTypingTest("\n'bar'");
|
||||
}
|
||||
|
||||
// PY-10972
|
||||
public void testEnterInIncompleteListComprehension() {
|
||||
doTypingTest("\nfoo");
|
||||
}
|
||||
|
||||
// PY-10972
|
||||
public void testEnterInIncompleteSetComprehension() {
|
||||
doTypingTest("\nfoo");
|
||||
}
|
||||
|
||||
// PY-10972
|
||||
public void testEnterInIncompleteDictComprehension() {
|
||||
doTypingTest("\nfoo");
|
||||
}
|
||||
|
||||
// PY-10972
|
||||
public void testEnterInIncompleteParenthesizedGenerator() {
|
||||
doTypingTest("\nfoo");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user