Files
vim-ingo-library-mirror/tests/cmdargs/file/t1200-FileOptionsAndCommandsToEscapedExCommandLine.vim
Ingo Karkat 25c9a303cd Add ingo#cmdargs#file#FileOptionsAndCommandsToEscapedExCommandLine()
Its implementation has been suggested by ingo#cmdargs#file#FilterFileOptionsAndCommands(), and most of my clients need this (but sometimes also the raw List, so I can't just change the default return value or make this configurable via a flag).
2018-09-25 16:43:03 +02:00

11 lines
688 B
VimL

" Test joining and escaping of file options and commands.
call vimtest#StartTap()
call vimtap#Plan(3)
call vimtap#Is(ingo#cmdargs#file#FileOptionsAndCommandsToEscapedExCommandLine(['++nobin', '++ff=dos']), '++nobin ++ff=dos', 'two options')
call vimtap#Is(ingo#cmdargs#file#FileOptionsAndCommandsToEscapedExCommandLine(['setl et | echomsg "foobar"|set wrap']), 'setl\ et\ |\ echomsg\ "foobar"|set\ wrap', 'one command')
call vimtap#Is(ingo#cmdargs#file#FileOptionsAndCommandsToEscapedExCommandLine(['++ff=unix', '++enc=utf-8', 'setl et | echomsg "foobar"|set wrap']), '++ff=unix ++enc=utf-8 setl\ et\ |\ echomsg\ "foobar"|set\ wrap', 'two options and one command')
call vimtest#Quit()