Updated tests

This commit is contained in:
Dhruva Sagar
2014-05-30 12:20:46 +05:30
parent 8d9a0082f5
commit 4c91a4efa2
2 changed files with 10 additions and 13 deletions

View File

@@ -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

View File

@@ -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'