Esempio n. 1
0
            private void Run(string vimRcText)
            {
                var lines = vimRcText.Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);

                _fileSystem.Setup(x => x.LoadVimRcContents()).Returns(new FSharpOption <FileContents>(new FileContents("_vimrc", lines)));
                Assert.True(Vim.LoadVimRc().IsLoadSucceeded);
            }
Esempio n. 2
0
 private void RunNone()
 {
     _fileSystem
     .Setup(x => x.GetVimRcFilePaths())
     .Returns(new VimRcPath[] { });
     Assert.True(Vim.LoadVimRc().IsLoadFailed);
 }
Esempio n. 3
0
            private void Run(string vimRcText)
            {
                var vimRcPath = new VimRcPath(VimRcKind.VimRc, "_vimrc");
                var lines     = vimRcText.Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);

                _fileSystem
                .Setup(x => x.GetVimRcFilePaths())
                .Returns(new[] { vimRcPath });
                _fileSystem
                .Setup(x => x.ReadAllLines(vimRcPath.FilePath))
                .Returns(FSharpOption.Create(lines));
                Assert.True(Vim.LoadVimRc().IsLoadSucceeded);
            }
Esempio n. 4
0
 private void RunNone()
 {
     _fileSystem.Setup(x => x.LoadVimRcContents()).Returns(FSharpOption <FileContents> .None);
     Assert.True(Vim.LoadVimRc().IsLoadFailed);
 }