From 9931e0888b2419326ae10ebbfae532261c5c125f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Thu, 30 Jun 2016 16:11:56 +0200 Subject: Fix submodules --- vim/bundle/vim-table-mode | 1 + vim/bundle/vim-table-mode/t/cell.vim | 135 ----------------------------------- 2 files changed, 1 insertion(+), 135 deletions(-) create mode 160000 vim/bundle/vim-table-mode delete mode 100644 vim/bundle/vim-table-mode/t/cell.vim (limited to 'vim/bundle/vim-table-mode/t/cell.vim') diff --git a/vim/bundle/vim-table-mode b/vim/bundle/vim-table-mode new file mode 160000 index 0000000..b613e39 --- /dev/null +++ b/vim/bundle/vim-table-mode @@ -0,0 +1 @@ +Subproject commit b613e39bd08ecebdb9b18100dae518050f496048 diff --git a/vim/bundle/vim-table-mode/t/cell.vim b/vim/bundle/vim-table-mode/t/cell.vim deleted file mode 100644 index e3d03ed..0000000 --- a/vim/bundle/vim-table-mode/t/cell.vim +++ /dev/null @@ -1,135 +0,0 @@ -" vim: fdm=indent -source t/config/options.vim - -describe 'cell' - describe 'API' - before - new - read t/fixtures/sample.txt - end - - it 'should return the cells with GetCells' - Expect tablemode#spreadsheet#cell#GetCells(2, 1, 1) ==# 'test11' - " Get Rows - Expect tablemode#spreadsheet#cell#GetCells(2, 1) == ['test11', 'test12'] - Expect tablemode#spreadsheet#cell#GetCells(2, 2) == ['test21', 'test22'] - " Get Columns - Expect tablemode#spreadsheet#cell#GetCells(2, 0, 1) == ['test11', 'test21'] - Expect tablemode#spreadsheet#cell#GetCells(2, 0, 2) == ['test12', 'test22'] - end - - it 'should return the row with GetRow' - Expect tablemode#spreadsheet#cell#GetRow(1, 2) == ['test11', 'test12'] - Expect tablemode#spreadsheet#cell#GetRow(2, 2) == ['test21', 'test22'] - end - - it 'should return the column with GetColumn' - Expect tablemode#spreadsheet#cell#GetColumn(1, 2) == ['test11', 'test21'] - Expect tablemode#spreadsheet#cell#GetColumn(2, 2) == ['test12', 'test22'] - end - - it 'should return the cells in a range with GetCellRange' - " Entire table as range - Expect tablemode#spreadsheet#cell#GetCellRange('1,1:2,2', 2, 1) == [['test11', 'test21'], ['test12', 'test22']] - - " Get Rows given different seed lines and columns - Expect tablemode#spreadsheet#cell#GetCellRange('1,1:1,2', 2, 1) == ['test11', 'test12'] - Expect tablemode#spreadsheet#cell#GetCellRange('1,1:1,2', 2, 2) == ['test11', 'test12'] - Expect tablemode#spreadsheet#cell#GetCellRange('1,1:1,2', 3, 1) == ['test11', 'test12'] - Expect tablemode#spreadsheet#cell#GetCellRange('1,1:1,2', 3, 2) == ['test11', 'test12'] - Expect tablemode#spreadsheet#cell#GetCellRange('2,1:2,2', 2, 1) == ['test21', 'test22'] - Expect tablemode#spreadsheet#cell#GetCellRange('2,1:2,2', 2, 2) == ['test21', 'test22'] - Expect tablemode#spreadsheet#cell#GetCellRange('2,1:2,2', 3, 1) == ['test21', 'test22'] - Expect tablemode#spreadsheet#cell#GetCellRange('2,1:2,2', 3, 2) == ['test21', 'test22'] - - " Get Columns given different seed lines and column - Expect tablemode#spreadsheet#cell#GetCellRange('1:2', 2, 1) == ['test11', 'test21'] - Expect tablemode#spreadsheet#cell#GetCellRange('1:2', 2, 2) == ['test12', 'test22'] - Expect tablemode#spreadsheet#cell#GetCellRange('1:2', 3, 1) == ['test11', 'test21'] - Expect tablemode#spreadsheet#cell#GetCellRange('1:2', 3, 2) == ['test12', 'test22'] - - " Get Column given negative values in range for representing rows from - " the end, -1 being the second last row. - Expect tablemode#spreadsheet#cell#GetCellRange('1:-1', 2, 1) == ['test11'] - Expect tablemode#spreadsheet#cell#GetCellRange('1:-1', 3, 1) == ['test11'] - Expect tablemode#spreadsheet#cell#GetCellRange('1:-1', 2, 2) == ['test12'] - Expect tablemode#spreadsheet#cell#GetCellRange('1:-1', 3, 2) == ['test12'] - end - end - - describe 'Motions' - describe 'left or right' - before - new - normal! ggdG - read t/fixtures/sample.txt - call cursor(2, 3) - end - - it 'should move left when not on first column' - 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(3, 3) - Expect tablemode#spreadsheet#RowNr('.') == 2 - Expect tablemode#spreadsheet#ColumnNr('.') == 1 - call tablemode#spreadsheet#cell#Motion('h') - Expect tablemode#spreadsheet#RowNr('.') == 1 - Expect tablemode#spreadsheet#ColumnNr('.') == 2 - end - - it 'should move right when not on last column' - Expect tablemode#spreadsheet#ColumnNr('.') == 1 - call tablemode#spreadsheet#cell#Motion('l') - Expect tablemode#spreadsheet#ColumnNr('.') == 2 - end - - 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#ColumnNr('.') == 2 - call tablemode#spreadsheet#cell#Motion('l') - Expect tablemode#spreadsheet#RowNr('.') == 2 - Expect tablemode#spreadsheet#ColumnNr('.') == 1 - end - end - - describe 'up or down' - before - new - normal! ggdG - read t/fixtures/sample.txt - call cursor(2, 3) - end - - it 'should move a row up unless on first row' - call cursor(3, 3) - Expect tablemode#spreadsheet#RowNr('.') == 2 - call tablemode#spreadsheet#cell#Motion('k') - Expect tablemode#spreadsheet#RowNr('.') == 1 - end - - it 'should remain on first row when trying to move up' - Expect tablemode#spreadsheet#RowNr('.') == 1 - call tablemode#spreadsheet#cell#Motion('k') - Expect tablemode#spreadsheet#RowNr('.') == 1 - end - - it 'should move a row down unless on last row' - Expect tablemode#spreadsheet#RowNr('.') == 1 - call tablemode#spreadsheet#cell#Motion('j') - Expect tablemode#spreadsheet#RowNr('.') == 2 - end - - it 'should remain on last row when trying to move down' - Expect tablemode#spreadsheet#RowNr('.') == 1 - call tablemode#spreadsheet#cell#Motion('k') - Expect tablemode#spreadsheet#RowNr('.') == 1 - end - end - end -end -- cgit v1.2.3