Fixing tabular align for unicode characters

This commit is contained in:
Dhruva Sagar
2014-04-07 15:00:34 +05:30
parent de2039dd24
commit 70744f308c
3 changed files with 80 additions and 3 deletions

18
t/align.vim Normal file
View File

@@ -0,0 +1,18 @@
" vim: fdm=indent
source t/config.vim
call vspec#hint({'scope': 'tablemode#align#scope()', 'sid': 'tablemode#align#sid()'})
describe 'Align'
it 'should align table content correctly'
let lines = ['| This | is a | table |', '| This | is also | a table |']
let result = ['| This | is a | table |', '| This | is also | a table |']
Expect tablemode#align#Align(lines) == result
end
it 'should align table content with unicode characters correctly'
let lines = ['| This | is 測試 | table |', '| This | is also | a table |']
let result = ['| This | is 測試 | table |', '| This | is also | a table |']
Expect tablemode#align#Align(lines) == result
end
end