X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/0ee596c5c5e11fc79598407eaf22f83d279f7e9e..5a4872f466ebd76ddd532bdf2798554421c53df4:/.vim/bundle/ale/test/util/test_cd_string_commands.vader diff --git a/.vim/bundle/ale/test/util/test_cd_string_commands.vader b/.vim/bundle/ale/test/util/test_cd_string_commands.vader new file mode 100644 index 00000000..d854214a --- /dev/null +++ b/.vim/bundle/ale/test/util/test_cd_string_commands.vader @@ -0,0 +1,20 @@ +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): + " We will check that escaping is done correctly for each platform. + AssertEqual + \ has('unix') ? 'cd ''/foo bar/baz'' && ' : 'cd /d "/foo bar/baz" && ', + \ ale#command#CdString('/foo bar/baz') + +Execute(CdString handle substitution and formatting): + call ale#test#SetFilename('foo.txt') + + AssertEqual + \ has('unix') ? 'cd %s:h && ' : 'cd /d %s:h && ', + \ ale#command#CdString('%s:h')