mirror of
https://github.com/inkarkat/vim-ingo-library.git
synced 2026-10-08 18:49:16 +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.
18 lines
463 B
VimL
18 lines
463 B
VimL
" Test joining of lines at end of buffer.
|
|
" Tests that trailing whitespace is kept, as no join takes place.
|
|
|
|
call append(line('$'), ['plain'])
|
|
call ingo#join#Lines(line('$'), 1, '')
|
|
|
|
call append(line('$'), ['4space '])
|
|
call ingo#join#Lines(line('$'), 1, '')
|
|
|
|
call append(line('$'), ["tab\t"])
|
|
call ingo#join#Lines(line('$'), 1, '')
|
|
|
|
call append(line('$'), ['softtabstop '])
|
|
call ingo#join#Lines(line('$'), 1, '')
|
|
|
|
call vimtest#SaveOut()
|
|
call vimtest#Quit()
|