mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-03-06 18:32:51 +01:00
Better place for cleaning global variables
This commit is contained in:
parent
3a47583cf9
commit
7d033787eb
test/org/jetbrains/plugins/ideavim
@ -18,6 +18,7 @@ import com.maddyhome.idea.vim.KeyHandler;
|
||||
import com.maddyhome.idea.vim.VimPlugin;
|
||||
import com.maddyhome.idea.vim.command.CommandState;
|
||||
import com.maddyhome.idea.vim.ex.ExOutputModel;
|
||||
import com.maddyhome.idea.vim.ex.vimscript.VimScriptGlobalEnvironment;
|
||||
import com.maddyhome.idea.vim.helper.EditorDataContext;
|
||||
import com.maddyhome.idea.vim.helper.RunnableHelper;
|
||||
import com.maddyhome.idea.vim.helper.StringHelper;
|
||||
@ -69,6 +70,7 @@ public abstract class VimTestCase extends UsefulTestCase {
|
||||
myFixture.tearDown();
|
||||
myFixture = null;
|
||||
ExEntryPanel.getInstance().deactivate(false);
|
||||
VimScriptGlobalEnvironment.getInstance().getVariables().clear();
|
||||
super.tearDown();
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
package org.jetbrains.plugins.ideavim.ex;
|
||||
|
||||
import com.maddyhome.idea.vim.ex.vimscript.VimScriptGlobalEnvironment;
|
||||
import org.jetbrains.plugins.ideavim.VimTestCase;
|
||||
|
||||
/**
|
||||
@ -16,12 +15,7 @@ public class VimScriptParserTest extends VimTestCase {
|
||||
public void testLetStringLiteralEcho() {
|
||||
configureByText("\n");
|
||||
typeText(commandToKeys("let s = \"foo\""));
|
||||
try {
|
||||
typeText(commandToKeys("echo s"));
|
||||
assertExOutput("foo\n");
|
||||
}
|
||||
finally {
|
||||
VimScriptGlobalEnvironment.getInstance().getVariables().clear();
|
||||
}
|
||||
typeText(commandToKeys("echo s"));
|
||||
assertExOutput("foo\n");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user