mirror of
https://github.com/dhruvasagar/vim-table-mode.git
synced 2025-11-08 02:53:48 -05:00
Fix tests for neovim
This commit is contained in:
1
.github/workflows/ci.yml
vendored
1
.github/workflows/ci.yml
vendored
@@ -47,3 +47,4 @@ jobs:
|
|||||||
cd ${{ github.workspace }}/pack/plugins/start/vim-table-mode
|
cd ${{ github.workspace }}/pack/plugins/start/vim-table-mode
|
||||||
echo "set packpath+=${{ github.workspace }}" > vimrc
|
echo "set packpath+=${{ github.workspace }}" > vimrc
|
||||||
${VIM} -u vimrc +TestifySuite +qall
|
${VIM} -u vimrc +TestifySuite +qall
|
||||||
|
cat testify_results.txt
|
||||||
|
|||||||
@@ -7,7 +7,12 @@ function! s:setup()
|
|||||||
call utils#TestSetup(s:test_file)
|
call utils#TestSetup(s:test_file)
|
||||||
endfunction
|
endfunction
|
||||||
call testify#setup(function('s:setup'))
|
call testify#setup(function('s:setup'))
|
||||||
call testify#teardown(function('utils#TestTeardown'))
|
|
||||||
|
function! s:teardown()
|
||||||
|
let g:table_mode_header_fillchar = '-'
|
||||||
|
bw!
|
||||||
|
endfunction
|
||||||
|
call testify#teardown(function('s:teardown'))
|
||||||
|
|
||||||
function! s:TestDeleteRow()
|
function! s:TestDeleteRow()
|
||||||
call cursor(5, 7)
|
call cursor(5, 7)
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ function! s:TestAddFormula()
|
|||||||
call testify#assert#equals(cell_value, '125.0')
|
call testify#assert#equals(cell_value, '125.0')
|
||||||
|
|
||||||
call cursor(9, 15)
|
call cursor(9, 15)
|
||||||
call testify#assert#equals(getline('.'), '/* tmf: $4,2=Sum(1:3) */')
|
call testify#assert#equals(getline('.'), ' tmf: $4,2=Sum(1:3) ')
|
||||||
|
|
||||||
call cursor(8, 15)
|
call cursor(8, 15)
|
||||||
call tablemode#spreadsheet#formula#Add('Sum(1:-1)')
|
call tablemode#spreadsheet#formula#Add('Sum(1:-1)')
|
||||||
@@ -23,6 +23,6 @@ function! s:TestAddFormula()
|
|||||||
call testify#assert#equals(cell_value, '250.0')
|
call testify#assert#equals(cell_value, '250.0')
|
||||||
|
|
||||||
call cursor(9, 15)
|
call cursor(9, 15)
|
||||||
call testify#assert#equals(getline('.'), '/* tmf: $4,2=Sum(1:3); $5,2=Sum(1:-1) */')
|
call testify#assert#equals(getline('.'), ' tmf: $4,2=Sum(1:3) ; $5,2=Sum(1:-1)')
|
||||||
endfunction
|
endfunction
|
||||||
call testify#it('Should Add a formula to the table correctly', function('s:TestAddFormula'))
|
call testify#it('Should Add a formula to the table correctly', function('s:TestAddFormula'))
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
| Item | Cost |
|
| Item | Cost |
|
||||||
|----------+-------|
|
|----------+------|
|
||||||
| Bread | 20 |
|
| Bread | 20 |
|
||||||
| Tomatoes | 5 |
|
| Tomatoes | 5 |
|
||||||
| Pasta | 100 |
|
| Pasta | 100 |
|
||||||
| Total | 0 |
|
| Total | 0 |
|
||||||
/* tmf: $4,2=Sum(1:-1) */
|
tmf: $4,2=Sum(1:-1)
|
||||||
|
|||||||
Reference in New Issue
Block a user