Пример #1
0
            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);
            }
Пример #2
0
 private static void AssertNotMatch(string fileName, string pattern)
 {
     Assert.False(AutoCommandRunner.FileNameEndsWithPattern(fileName, pattern));
 }
Пример #3
0
 protected AutoCommandRunnerTest()
 {
     _autoCommandRunner = new AutoCommandRunner(Vim);
 }
Пример #4
0
 protected AutoCommandRunnerTest()
 {
     _autoCommandRunner = new AutoCommandRunner(Vim);
 }