tablemode.vim 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. " vim: fdm=indent
  2. source t/config/options.vim
  3. describe 'tablemode'
  4. describe 'Activation'
  5. describe 'tablemode#Enable()'
  6. before
  7. call tablemode#Enable()
  8. end
  9. it 'should enable table mode'
  10. Expect b:table_mode_active to_be_true
  11. end
  12. end
  13. describe 'tablemode#Disable()'
  14. before
  15. call tablemode#Disable()
  16. end
  17. it 'should disable table mode'
  18. Expect b:table_mode_active to_be_false
  19. end
  20. end
  21. describe 'tablemode#Toggle()'
  22. it 'should toggle table mode'
  23. call tablemode#Toggle()
  24. Expect b:table_mode_active to_be_true
  25. call tablemode#Toggle()
  26. Expect b:table_mode_active to_be_false
  27. end
  28. end
  29. end
  30. describe 'Tableize'
  31. before
  32. new
  33. read t/fixtures/tableize.txt
  34. end
  35. it 'should tableize with default delimiter'
  36. :2,3call tablemode#TableizeRange('')
  37. Expect tablemode#table#IsRow(2) to_be_true
  38. Expect tablemode#spreadsheet#RowCount(2) == 2
  39. Expect tablemode#spreadsheet#ColumnCount(2) == 3
  40. end
  41. it 'should tableize with given delimiter'
  42. :2,3call tablemode#TableizeRange('/;')
  43. Expect tablemode#table#IsRow(2) to_be_true
  44. Expect tablemode#spreadsheet#RowCount(2) == 2
  45. Expect tablemode#spreadsheet#ColumnCount(2) == 2
  46. end
  47. end
  48. end