mirror of
https://github.com/inkarkat/vim-ingo-library.git
synced 2026-10-19 04:18:28 +02:00
I've discovered an alternative implementation in AdvancedJoiners#QueryJoin#JoinLines() that considered some corner cases that this one would not handle, but the overall implementation is cleaner (and newer) in here. Therefore, add test coverage and port the fixes over to here, and make it correct.
20 lines
499 B
VimL
20 lines
499 B
VimL
" Test joining of plain unindented lines.
|
|
|
|
call append(0, ['plain', 'without separator'])
|
|
call ingo#join#Lines(1, 1, '')
|
|
|
|
call append(0, ['plain', 'with space separator'])
|
|
call ingo#join#Lines(1, 1, ' ')
|
|
|
|
call append(0, ['plain', 'with - separator'])
|
|
call ingo#join#Lines(1, 1, '-')
|
|
|
|
call append(0, ['plain', 'with XX separator'])
|
|
call ingo#join#Lines(1, 1, 'XX')
|
|
|
|
call append(0, ['plain', 'with space-space separator'])
|
|
call ingo#join#Lines(1, 1, ' - ')
|
|
|
|
call vimtest#SaveOut()
|
|
call vimtest#Quit()
|