File: test-pplatex.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 (35 lines) | stat: -rw-r--r-- 1,023 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
33
34
35
set nocompatible
let &rtp = '../..,' . &rtp
filetype plugin on

if !executable('pplatex') | quitall | endif

let g:vimtex_quickfix_method = 'pplatex'

silent edit test-pplatex.tex

try
  call vimtex#qf#setqflist()
catch /VimTeX: No log file found/
  echo 'VimTeX: No log file found'
  cquit
endtry

let s:qf = getqflist()

let s:n = 0
for s:expect in [
      \ {'lnum': 43,  'type': 'W', 'text': "so3_matrix_norm' on page 1 undefined"},
      \ {'lnum': 177, 'type': 'W', 'text': "\nReference `section_model_main' on page 1 undefined"},
      \ {'lnum': 181, 'type': 'W', 'text': "orient_samp' on page 1 undefined"},
      \ {'lnum': 0,   'type': 'W', 'text': "There were undefined references."},
      \]
  call assert_equal(s:expect.lnum, s:qf[s:n].lnum, 'Failed at index ' . s:n)
  call assert_equal(s:expect.type, s:qf[s:n].type, 'Failed at index ' . s:n)
  call assert_equal(s:expect.text, s:qf[s:n].text, 'Failed at index ' . s:n)
  let s:n += 1
endfor

call assert_equal(s:n, len(s:qf))

call vimtex#test#finished()