use of com.google.idea.blaze.base.model.primitives.WorkspacePath in project intellij by bazelbuild.
the class BuildQuoteHandlerTest method testClosingTripleSingleQuoteInserted.
@Test
public void testClosingTripleSingleQuoteInserted() {
BuildFile file = createBuildFile(new WorkspacePath("BUILD"), "");
editorTest.performTypingAction(file, '\'');
editorTest.performTypingAction(file, '\'');
editorTest.performTypingAction(file, '\'');
assertFileContents(file, "''''''");
}
use of com.google.idea.blaze.base.model.primitives.WorkspacePath in project intellij by bazelbuild.
the class BuildQuoteHandlerTest method testAdditionalQuoteNotInsertedWhenClosingQuotes.
@Test
public void testAdditionalQuoteNotInsertedWhenClosingQuotes() {
BuildFile file = createBuildFile(new WorkspacePath("BUILD"), "'text<caret>", "laterContents");
testFixture.configureFromExistingVirtualFile(file.getVirtualFile());
editorTest.performTypingAction(file, '\'');
testFixture.checkResult(Joiner.on("\n").join("'text'<caret>", "laterContents"));
}
use of com.google.idea.blaze.base.model.primitives.WorkspacePath in project intellij by bazelbuild.
the class BuildQuoteHandlerTest method testOnlyCaretMovedWhenCompletingExistingClosingQuotes.
@Test
public void testOnlyCaretMovedWhenCompletingExistingClosingQuotes() {
BuildFile file = createBuildFile(new WorkspacePath("BUILD"), "'text<caret>'", "laterContents");
testFixture.configureFromExistingVirtualFile(file.getVirtualFile());
editorTest.performTypingAction(file, '\'');
testFixture.checkResult(Joiner.on("\n").join("'text'<caret>", "laterContents"));
}
use of com.google.idea.blaze.base.model.primitives.WorkspacePath in project intellij by bazelbuild.
the class BuildQuoteHandlerTest method testAdditionalTripleQuotesNotInsertedWhenClosingQuotes.
@Test
public void testAdditionalTripleQuotesNotInsertedWhenClosingQuotes() {
BuildFile file = createBuildFile(new WorkspacePath("BUILD"), "'''text''<caret>", "laterContents");
testFixture.configureFromExistingVirtualFile(file.getVirtualFile());
editorTest.performTypingAction(file, '\'');
testFixture.checkResult(Joiner.on("\n").join("'''text'''<caret>", "laterContents"));
}
use of com.google.idea.blaze.base.model.primitives.WorkspacePath in project intellij by bazelbuild.
the class EnterInLineCommentTest method testInternalNewlineCommented.
@Test
public void testInternalNewlineCommented() {
BuildFile file = createBuildFile(new WorkspacePath("BUILD"), "# first line comment", "# second line comment");
Editor editor = editorTest.openFileInEditor(file.getVirtualFile());
editorTest.setCaretPosition(editor, 1, "# second ".length());
editorTest.performTypingAction(editor, '\n');
assertFileContents(file, "# first line comment", "# second ", "# line comment");
editorTest.assertCaretPosition(editor, 2, 2);
}
Aggregations