mirror of
https://github.com/dhruvasagar/vim-table-mode.git
synced 2025-11-08 11:03:47 -05:00
28 lines
1.1 KiB
VimL
28 lines
1.1 KiB
VimL
source t/config/options.vim
|
|
source t/utils.vim
|
|
|
|
let s:test_file = 't/fixtures/tableize.txt'
|
|
function! s:setup()
|
|
call utils#TestSetup(s:test_file)
|
|
endfunction
|
|
call testify#setup(function('s:setup'))
|
|
call testify#teardown(function('utils#TestTeardown'))
|
|
|
|
function! s:TestTabelize()
|
|
:3,4call tablemode#TableizeRange('')
|
|
call testify#assert#assert(tablemode#table#IsRow(3))
|
|
call testify#assert#equals(tablemode#spreadsheet#RowCount(3), 2)
|
|
call testify#assert#equals(tablemode#spreadsheet#ColumnCount(3), 3)
|
|
call utils#TestUndo(s:test_file)
|
|
endfunction
|
|
call testify#it('Tableize should tableize with default delimiter correctly', function('s:TestTabelize'))
|
|
|
|
function! s:TestTabelizeCustomDelimiter()
|
|
:3,4call tablemode#TableizeRange('/;')
|
|
call testify#assert#assert(tablemode#table#IsRow(3))
|
|
call testify#assert#equals(tablemode#spreadsheet#RowCount(3), 2)
|
|
call testify#assert#equals(tablemode#spreadsheet#ColumnCount(3), 2)
|
|
call utils#TestUndo(s:test_file)
|
|
endfunction
|
|
call testify#it('Tableize should tableize with custom delimiter correctly', function('s:TestTabelizeCustomDelimiter'))
|