diff options
Diffstat (limited to 'test/util/test_cd_string_commands.vader')
-rw-r--r-- | test/util/test_cd_string_commands.vader | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/util/test_cd_string_commands.vader b/test/util/test_cd_string_commands.vader index b0b6c157..f8a97cb8 100644 --- a/test/util/test_cd_string_commands.vader +++ b/test/util/test_cd_string_commands.vader @@ -1,8 +1,15 @@ Before: silent! cd /testplugin/test/util + let g:dir = getcwd() + +After: + silent execute 'cd ' . fnameescape(g:dir) + unlet! g:dir Execute(CdString should output the correct command string): AssertEqual 'cd ''/foo bar/baz'' && ', ale#path#CdString('/foo bar/baz') Execute(BufferCdString should output the correct command string): - AssertEqual 'cd ' . shellescape(getcwd()) . ' && ', ale#path#BufferCdString(bufnr('')) + call ale#test#SetFilename('foo.txt') + + AssertEqual 'cd ' . shellescape(g:dir) . ' && ', ale#path#BufferCdString(bufnr('')) |