place missing comma(s) when caret is put between completion hints 'manually' (IDEA-178659)

This commit is contained in:
Dmitry Batrak
2018-07-16 10:49:09 +03:00
parent 98b35405bc
commit dfe8f283a9
5 changed files with 75 additions and 7 deletions
@@ -1369,6 +1369,17 @@ public class CompletionHintsTest extends AbstractParameterInfoTestCase {
"}");
}
public void testCaretMovementOverVirtualComma() throws Exception {
enableVirtualComma();
configureJava("class C { void m() { System.getPro<caret> } }");
complete("getProperty(String key, String def)");
checkResultWithInlays("class C { void m() { System.getProperty(<HINT text=\"key:\"/><caret><Hint text=\",def:\"/>) } }");
right();
checkResultWithInlays("class C { void m() { System.getProperty(<Hint text=\"key:\"/>, <HINT text=\"def:\"/><caret>) } }");
}
private void checkResultWithInlays(String text) {
myFixture.checkResultWithInlays(text);
}