diff --git a/platform/platform-tests/testSrc/com/intellij/application/options/codeInsight/editor/quotes/SelectionQuotingTypedHandlerTest.java b/platform/platform-tests/testSrc/com/intellij/application/options/codeInsight/editor/quotes/SelectionQuotingTypedHandlerTest.java index 6a5ec5d5ce2d..6bd8fcb884c0 100644 --- a/platform/platform-tests/testSrc/com/intellij/application/options/codeInsight/editor/quotes/SelectionQuotingTypedHandlerTest.java +++ b/platform/platform-tests/testSrc/com/intellij/application/options/codeInsight/editor/quotes/SelectionQuotingTypedHandlerTest.java @@ -23,6 +23,7 @@ import com.intellij.openapi.editor.actionSystem.TypedAction; import com.intellij.openapi.editor.ex.EditorEx; import com.intellij.openapi.fileTypes.FileTypes; import com.intellij.openapi.project.Project; +import com.intellij.openapi.util.registry.Registry; import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase; import org.jetbrains.annotations.NotNull; @@ -111,19 +112,25 @@ public class SelectionQuotingTypedHandlerTest extends LightPlatformCodeInsightFi } private void doTest(@NotNull final String cs, @NotNull String before, @NotNull String expected) { - myFixture.configureByText(FileTypes.PLAIN_TEXT, before); - final TypedAction typedAction = EditorActionManager.getInstance().getTypedAction(); + final boolean smarterSelection = Registry.is("editor.smarterSelectionQuoting"); + Registry.get("editor.smarterSelectionQuoting").setValue(true); + try { + myFixture.configureByText(FileTypes.PLAIN_TEXT, before); + final TypedAction typedAction = EditorActionManager.getInstance().getTypedAction(); - performAction(myFixture.getProject(), new Runnable() { - @Override - public void run() { - for (int i = 0, max = cs.length(); i < max; i++) { - final char c = cs.charAt(i); - typedAction.actionPerformed(myFixture.getEditor(), c, ((EditorEx)myFixture.getEditor()).getDataContext()); + performAction(myFixture.getProject(), new Runnable() { + @Override + public void run() { + for (int i = 0, max = cs.length(); i < max; i++) { + final char c = cs.charAt(i); + typedAction.actionPerformed(myFixture.getEditor(), c, ((EditorEx)myFixture.getEditor()).getDataContext()); + } } - } - }); - myFixture.checkResult(expected); + }); + myFixture.checkResult(expected); + } finally { + Registry.get("editor.smarterSelectionQuoting").setValue(smarterSelection); + } } public void testRuby7852ErrantEditor() {