File: test-getters.vim

package info (click to toggle)
vim-vimtex 2.17-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,844 kB
  • sloc: makefile: 360; python: 103
file content (22 lines) | stat: -rw-r--r-- 489 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
set nocompatible
set runtimepath^=../..
filetype plugin on
syntax on

nnoremap q :qall!<cr>

silent edit test-getters.tex

normal! 8G
call assert_equal(['y', 'x'], map(vimtex#env#get_all(), 'v:val.name'))
call assert_equal('y', vimtex#env#get_inner().name)
call assert_equal('x', vimtex#env#get_outer().name)

" Simple profiling
" let s:t0 = vimtex#profile#time()
" for s:i in range(100)
"   call vimtex#env#get_all()
" endfor
" call vimtex#profile#time(s:t0)

call vimtex#test#finished()