Rewrite tests with vim-testify

This commit is contained in:
Dhruva Sagar
2023-03-01 07:22:48 +05:30
parent 9555a3e6e5
commit 7ec0b83dbd
37 changed files with 1241 additions and 862 deletions

View File

@@ -0,0 +1,27 @@
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'))