From 4c91a4efa2e62d71fd723d544bf785fb67c2e53f Mon Sep 17 00:00:00 2001 From: Dhruva Sagar Date: Fri, 30 May 2014 12:20:46 +0530 Subject: [PATCH] Updated tests --- t/cell.vim | 18 ++++++++---------- t/spreadsheet.vim | 5 ++--- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/t/cell.vim b/t/cell.vim index bc34abe..4b333b3 100644 --- a/t/cell.vim +++ b/t/cell.vim @@ -64,20 +64,19 @@ describe 'cell' before new normal! ggdG - call tablemode#Enable() - normal i|test11|test12| |test21|test22| - call cursor(1, 3) + read t/fixtures/sample.txt + call cursor(2, 3) end it 'should move left when not on first column' - call cursor(1, 12) + call cursor(2, 12) Expect tablemode#spreadsheet#ColumnNr('.') == 2 call tablemode#spreadsheet#cell#Motion('h') Expect tablemode#spreadsheet#ColumnNr('.') == 1 end it 'should move to the previous row last column if it exists when on first column' - call cursor(2, 3) + call cursor(3, 3) Expect tablemode#spreadsheet#RowNr('.') == 2 Expect tablemode#spreadsheet#ColumnNr('.') == 1 call tablemode#spreadsheet#cell#Motion('h') @@ -92,7 +91,7 @@ describe 'cell' end it 'should move to the next row first column if it exists when on last column' - call cursor(1, 12) + call cursor(2, 12) Expect tablemode#spreadsheet#RowNr('.') == 1 Expect tablemode#spreadsheet#ColumnNr('.') == 2 call tablemode#spreadsheet#cell#Motion('l') @@ -105,13 +104,12 @@ describe 'cell' before new normal! ggdG - call tablemode#Enable() - normal i|test11|test12| |test21|test22| - call cursor(1, 3) + read t/fixtures/sample.txt + call cursor(2, 3) end it 'should move a row up unless on first row' - call cursor(2, 3) + call cursor(3, 3) Expect tablemode#spreadsheet#RowNr('.') == 2 call tablemode#spreadsheet#cell#Motion('k') Expect tablemode#spreadsheet#RowNr('.') == 1 diff --git a/t/spreadsheet.vim b/t/spreadsheet.vim index e77ecbe..ca3e2f9 100644 --- a/t/spreadsheet.vim +++ b/t/spreadsheet.vim @@ -88,9 +88,8 @@ describe 'spreadsheet' before new normal! ggdG - call tablemode#Enable() - normal i|test11|test12| |test21|test22| - call cursor(1, 3) + read t/fixtures/sample.txt + call cursor(2, 3) end it 'should delete a row successfully'