File: test_auxdir.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 (46 lines) | stat: -rw-r--r-- 1,232 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
36
37
38
39
40
41
42
43
44
45
46
set nocompatible
let &rtp = '../..,' . &rtp
filetype plugin on

nnoremap q :qall!<cr>

function! Test(file, expected) abort
  silent edit test_auxdir/test.tex
  let l:file = vimtex#paths#shorten_relative(
        \ b:vimtex.compiler.get_file(a:file))
  call assert_equal(a:expected, l:file)
  bwipeout
endfunction

call Test('pdf', 'test.pdf')

let g:vimtex_compiler_latexmk = {'out_dir': 'out'}
call Test('pdf', 'out/test.pdf')
call Test('aux', 'out/test.aux')
call Test('fls', 'out/test.fls')
call Test('log', 'out/test.log')
call Test('blg', 'out/test.blg')

let g:vimtex_compiler_latexmk = {'aux_dir': 'auxfiles'}
call Test('pdf', 'test.pdf')
call Test('fls', 'test.fls')
call Test('aux', 'auxfiles/test.aux')
call Test('log', 'auxfiles/test.log')
call Test('blg', 'auxfiles/test.blg')

let g:vimtex_compiler_latexmk = {
      \ 'out_dir': 'out',
      \ 'aux_dir': 'auxfiles'
      \}
call Test('pdf', 'out/test.pdf')
call Test('fls', 'out/test.fls')
call Test('aux', 'auxfiles/test.aux')
call Test('log', 'auxfiles/test.log')
call Test('blg', 'auxfiles/test.blg')

call vimtex#log#set_silent()
let $VIMTEX_OUTPUT_DIRECTORY = 'out'
call Test('aux', 'out/test.aux')
call Test('log', 'out/test.log')

call vimtex#test#finished()