My dotfiles. Period.

test-askmenu.vim 2.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. "=============================================================================
  2. " $Id: test-askmenu.vim 520 2012-03-19 18:09:15Z luc.hermitte $
  3. " File: tests/test-buffer-menu.vim {{{1
  4. " Author: Luc Hermitte <EMAIL:hermitte {at} free {dot} fr>
  5. " <URL:http://code.google.com/p/lh-vim/>
  6. " License: GPLv3 with exceptions
  7. " <URL:http://code.google.com/p/lh-vim/wiki/License>
  8. " Version: 3.0.0
  9. " Created: 18th Apr 2007
  10. " Last Update: $Date: 2012-03-19 19:09:15 +0100 (Mon, 19 Mar 2012) $
  11. "------------------------------------------------------------------------
  12. " Description:
  13. " Test units for buffermenu.vim
  14. "
  15. "------------------------------------------------------------------------
  16. " Installation: Requires:
  17. " (*) Vim 7.0+
  18. " (*) vim_units.vim v0.2/1.0?
  19. " Vimscript # «???»
  20. " (*) lh-vim-lib (lh#ask#menu)
  21. "
  22. " User Manual:
  23. " Source this file.
  24. "
  25. " History:
  26. " (*) 17th Apr 2007: First version
  27. " TODO: «missing features»
  28. " }}}1
  29. "=============================================================================
  30. "=============================================================================
  31. let s:cpo_save=&cpo
  32. "------------------------------------------------------------------------
  33. " Functions {{{1
  34. function! TestAskMenu()
  35. imenu 42.40.10 &LH-Tests.&Menu.&ask.i iask
  36. inoremenu 42.40.10 &LH-Tests.&Menu.&ask.inore inoreask
  37. nmenu 42.40.10 &LH-Tests.&Menu.&ask.n nask
  38. nnoremenu 42.40.10 &LH-Tests.&Menu.&ask.nnore nnoreask
  39. nmenu <script> 42.40.10 &LH-Tests.&Menu.&ask.nscript nscriptask
  40. nnoremenu <script> 42.40.10 &LH-Tests.&Menu.&ask.nnnscript nnscriptask
  41. vmenu 42.40.10 &LH-Tests.&Menu.&ask.v vask
  42. vnoremenu 42.40.10 &LH-Tests.&Menu.&ask.vnore vnoreask
  43. call s:CheckInMode('i', 'i')
  44. endfunction
  45. function! s:CheckInMode(mode, name)
  46. let g:menu = lh#askvim#menu('LH-Tests.Menu.ask.'.a:name, a:mode)
  47. let g:name = a:name
  48. " VUAssert 55 Equals g:menu.name g:name "Name mismatch"
  49. " VUAssert 56 Equals g:menu.priority '42.40.10' "Priority mismatch"
  50. " VUAssert 57 Fail "parce qu'il le faut bien"
  51. echomsg "name= ".g:menu.name
  52. echomsg "prio= ".g:menu.priority
  53. endfunction
  54. " Functions }}}1
  55. "------------------------------------------------------------------------
  56. let &cpo=s:cpo_save
  57. "=============================================================================
  58. " vim600: set fdm=marker: