mirror of
https://github.com/dhruvasagar/vim-table-mode.git
synced 2025-11-11 04:23:47 -05:00
Improved tests
This commit is contained in:
32
t/table.vim
32
t/table.vim
@@ -100,14 +100,16 @@ describe 'table'
|
|||||||
|
|
||||||
describe 'Realign'
|
describe 'Realign'
|
||||||
describe 'without header alignments'
|
describe 'without header alignments'
|
||||||
before
|
describe 'for simple'
|
||||||
new
|
before
|
||||||
read t/fixtures/table/sample_realign_before.txt
|
new
|
||||||
end
|
read t/fixtures/table/sample_realign_before.txt
|
||||||
|
end
|
||||||
|
|
||||||
it 'should be aligned properly'
|
it 'should be aligned properly'
|
||||||
call tablemode#table#Realign(1)
|
call tablemode#table#Realign(1)
|
||||||
Expect getline(1,'$') == readfile('t/fixtures/table/sample_realign_after.txt')
|
Expect getline(1,'$') == readfile('t/fixtures/table/sample_realign_after.txt')
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'for unicode'
|
describe 'for unicode'
|
||||||
@@ -125,14 +127,16 @@ describe 'table'
|
|||||||
end
|
end
|
||||||
|
|
||||||
describe 'with header alignments'
|
describe 'with header alignments'
|
||||||
before
|
describe 'for simple'
|
||||||
new
|
before
|
||||||
read t/fixtures/table/sample_header_realign_before.txt
|
new
|
||||||
end
|
read t/fixtures/table/sample_header_realign_before.txt
|
||||||
|
end
|
||||||
|
|
||||||
it 'should be aligned properly'
|
it 'should be aligned properly'
|
||||||
call tablemode#table#Realign(1)
|
call tablemode#table#Realign(1)
|
||||||
Expect getline(1,'$') == readfile('t/fixtures/table/sample_header_realign_after.txt')
|
Expect getline(1,'$') == readfile('t/fixtures/table/sample_header_realign_after.txt')
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'for unicode'
|
describe 'for unicode'
|
||||||
|
|||||||
Reference in New Issue
Block a user