File: test-starred.vim

package info (click to toggle)
vim-vimtex 2.16-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 8,660 kB
  • sloc: makefile: 367; python: 103
file content (32 lines) | stat: -rw-r--r-- 647 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
23
24
25
26
27
28
29
30
31
32
set nocompatible
let &rtp = '../..,' . &rtp
filetype plugin on

set nomore

nnoremap q :qall!<cr>

silent edit test-starred.tex

if empty($INMAKE) | finish | endif

let s:toc = vimtex#toc#get_entries()
call assert_equal(11, len(s:toc))

for [index, level, nstring] in [
      \ [1, 0, '1'],
      \ [2, 1, '1.1'],
      \ [3, 5, ''],
      \ [4, 0, ''],
      \ [5, 1, ''],
      \ [6, 5, ''],
      \ [7, 1, '1.2'],
      \ [8, 5, ''],
      \ [9, 0, ''],
      \ [10, 1, ''],
      \]
  call assert_equal(level, s:toc[index].level)
  call assert_equal(nstring, b:vimtex.toc.print_number(s:toc[index].number))
endfor

call vimtex#test#finished()