public void StopInsert() { var autoCommandRunner = new AutoCommandRunner(Vim); VimData.AddAutoCommand(EventKind.BufEnter, "*", "stopinsert"); var vimBuffer1 = CreateVimBuffer("abc", "def", ""); var vimBuffer2 = CreateVimBuffer("ghi", "jkl", ""); Assert.Equal(ModeKind.Normal, vimBuffer2.ModeKind); vimBuffer2.SwitchMode(ModeKind.Insert, ModeArgument.None); Assert.Equal(ModeKind.Insert, vimBuffer2.ModeKind); autoCommandRunner.RunAutoCommands(vimBuffer1, EventKind.BufEnter); Assert.Equal(ModeKind.Insert, vimBuffer2.ModeKind); autoCommandRunner.RunAutoCommands(vimBuffer2, EventKind.BufEnter); Assert.Equal(ModeKind.Normal, vimBuffer2.ModeKind); }
private static void AssertNotMatch(string fileName, string pattern) { Assert.False(AutoCommandRunner.FileNameEndsWithPattern(fileName, pattern)); }
protected AutoCommandRunnerTest() { _autoCommandRunner = new AutoCommandRunner(Vim); }