mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
Test for RUBY-16672
This commit is contained in:
@@ -154,6 +154,28 @@ public class LiveTemplateTest extends LightCodeInsightFixtureTestCase {
|
||||
myFixture.type("foo");
|
||||
checkResultByText("foo");
|
||||
}
|
||||
|
||||
public void testTemplateWithIndentedEnd() throws Exception {
|
||||
configureFromFileText("empty.java", "class C {\n" +
|
||||
" bar() {\n" +
|
||||
" <caret>\n" +
|
||||
" }\n" +
|
||||
"}");
|
||||
TemplateManager manager = TemplateManager.getInstance(getProject());
|
||||
Template template = manager.createTemplate("empty", "user", 'foo();\n' +
|
||||
'int i = 0; $END$\n' +
|
||||
'foo()');
|
||||
template.setToReformat(true);
|
||||
startTemplate(template);
|
||||
checkResultByText("class C {\n" +
|
||||
" bar() {\n" +
|
||||
" foo();\n" +
|
||||
" int i = 0; <caret>\n" +
|
||||
" foo()\n" +
|
||||
" }\n" +
|
||||
"}");
|
||||
}
|
||||
|
||||
|
||||
public void testTemplateWithEndOnEmptyLine() throws Exception {
|
||||
configureFromFileText("empty.java", "class C {\n" +
|
||||
|
||||
Reference in New Issue
Block a user