mirror of
https://github.com/dhruvasagar/vim-table-mode.git
synced 2025-11-08 11:03:47 -05:00
Updated tests
This commit is contained in:
18
t/cell.vim
18
t/cell.vim
@@ -64,20 +64,19 @@ describe 'cell'
|
|||||||
before
|
before
|
||||||
new
|
new
|
||||||
normal! ggdG
|
normal! ggdG
|
||||||
call tablemode#Enable()
|
read t/fixtures/sample.txt
|
||||||
normal i|test11|test12|
|
call cursor(2, 3)
|
||||||
|test21|test22|
|
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should move left when not on first column'
|
it 'should move left when not on first column'
|
||||||
it 'should move left when not on first column'
|
call cursor(2, 12)
|
||||||
Expect tablemode#spreadsheet#ColumnNr('.') == 2
|
Expect tablemode#spreadsheet#ColumnNr('.') == 2
|
||||||
call tablemode#spreadsheet#cell#Motion('h')
|
call tablemode#spreadsheet#cell#Motion('h')
|
||||||
Expect tablemode#spreadsheet#ColumnNr('.') == 1
|
Expect tablemode#spreadsheet#ColumnNr('.') == 1
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should move to the previous row last column if it exists when on first column'
|
it 'should move to the previous row last column if it exists when on first column'
|
||||||
it 'should move to the previous row last column if it exists when on first column'
|
call cursor(3, 3)
|
||||||
Expect tablemode#spreadsheet#RowNr('.') == 2
|
Expect tablemode#spreadsheet#RowNr('.') == 2
|
||||||
Expect tablemode#spreadsheet#ColumnNr('.') == 1
|
Expect tablemode#spreadsheet#ColumnNr('.') == 1
|
||||||
call tablemode#spreadsheet#cell#Motion('h')
|
call tablemode#spreadsheet#cell#Motion('h')
|
||||||
@@ -92,7 +91,7 @@ describe 'cell'
|
|||||||
end
|
end
|
||||||
|
|
||||||
it 'should move to the next row first column if it exists when on last column'
|
it 'should move to the next row first column if it exists when on last column'
|
||||||
it 'should move to the next row first column if it exists when on last column'
|
call cursor(2, 12)
|
||||||
Expect tablemode#spreadsheet#RowNr('.') == 1
|
Expect tablemode#spreadsheet#RowNr('.') == 1
|
||||||
Expect tablemode#spreadsheet#ColumnNr('.') == 2
|
Expect tablemode#spreadsheet#ColumnNr('.') == 2
|
||||||
call tablemode#spreadsheet#cell#Motion('l')
|
call tablemode#spreadsheet#cell#Motion('l')
|
||||||
@@ -105,13 +104,12 @@ describe 'cell'
|
|||||||
before
|
before
|
||||||
new
|
new
|
||||||
normal! ggdG
|
normal! ggdG
|
||||||
normal! ggdG
|
read t/fixtures/sample.txt
|
||||||
call tablemode#Enable()
|
call cursor(2, 3)
|
||||||
normal i|test11|test12|
|
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should move a row up unless on first row'
|
it 'should move a row up unless on first row'
|
||||||
|
call cursor(3, 3)
|
||||||
Expect tablemode#spreadsheet#RowNr('.') == 2
|
Expect tablemode#spreadsheet#RowNr('.') == 2
|
||||||
call tablemode#spreadsheet#cell#Motion('k')
|
call tablemode#spreadsheet#cell#Motion('k')
|
||||||
Expect tablemode#spreadsheet#RowNr('.') == 1
|
Expect tablemode#spreadsheet#RowNr('.') == 1
|
||||||
|
|||||||
@@ -88,9 +88,8 @@ describe 'spreadsheet'
|
|||||||
before
|
before
|
||||||
new
|
new
|
||||||
normal! ggdG
|
normal! ggdG
|
||||||
call tablemode#Enable()
|
read t/fixtures/sample.txt
|
||||||
normal i|test11|test12|
|
call cursor(2, 3)
|
||||||
|test21|test22|
|
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should delete a row successfully'
|
it 'should delete a row successfully'
|
||||||
|
|||||||
Reference in New Issue
Block a user