test_cd_string_commands.vader
1 Before: 2 silent! cd /testplugin/test/util 3 let g:dir = getcwd() 4 5 After: 6 silent execute 'cd ' . fnameescape(g:dir) 7 unlet! g:dir 8 9 Execute(CdString should output the correct command string): 10 " We will check that escaping is done correctly for each platform. 11 AssertEqual 12 \ has('unix') ? 'cd ''/foo bar/baz'' && ' : 'cd /d "/foo bar/baz" && ', 13 \ ale#command#CdString('/foo bar/baz') 14 15 Execute(CdString handle substitution and formatting): 16 call ale#test#SetFilename('foo.txt') 17 18 AssertEqual 19 \ has('unix') ? 'cd %s:h && ' : 'cd /d %s:h && ', 20 \ ale#command#CdString('%s:h')