diff --git a/tests/com/simpleplugin/SimpleCodeInsightTest.java b/tests/com/simpleplugin/SimpleCodeInsightTest.java index e820558e1..5874da196 100644 --- a/tests/com/simpleplugin/SimpleCodeInsightTest.java +++ b/tests/com/simpleplugin/SimpleCodeInsightTest.java @@ -1,6 +1,7 @@ package com.simpleplugin; import com.intellij.codeInsight.completion.CompletionType; +import com.intellij.codeInsight.generation.actions.CommentByLineCommentAction; import com.intellij.openapi.application.ApplicationManager; import com.intellij.psi.PsiElement; import com.intellij.psi.codeStyle.CodeStyleManager; @@ -54,4 +55,13 @@ public class SimpleCodeInsightTest extends LightCodeInsightFixtureTestCase { myFixture.renameElementAtCaret("websiteUrl"); myFixture.checkResultByFile("RenameTestData.simple", "RenameTestDataAfter.simple", false); } + + public void testCommenter() { + myFixture.configureByText(SimpleFileType.INSTANCE, "website = http://en.wikipedia.org/"); + CommentByLineCommentAction commentAction = new CommentByLineCommentAction(); + commentAction.actionPerformedImpl(getProject(), myFixture.getEditor()); + myFixture.checkResult("#website = http://en.wikipedia.org/"); + commentAction.actionPerformedImpl(getProject(), myFixture.getEditor()); + myFixture.checkResult("website = http://en.wikipedia.org/"); + } } \ No newline at end of file