vimtex/test/vader/get_main.vader
2016-09-01 22:29:23 +02:00

17 lines
562 B
Plaintext

Execute (Assert b:vimtex.tex = latexmain.tex):
call writefile(['\include{test.tex}'], 'latexmain.tex')
call system('touch latexmain.tex.latexmain')
new test.tex
AssertEqual 'latexmain.tex', fnamemodify(b:vimtex.tex, ':t')
bdelete!
call system('rm latexmain.tex*')
Execute (Assert b:vimtex.tex = main_texroot.tex):
call system('touch main_texroot.tex')
call writefile(['%! TeX Root = main_texroot.tex'], 'test.tex')
new test.tex
AssertEqual 'main_texroot.tex', fnamemodify(b:vimtex.tex, ':t')
bdelete!
call system('rm main_texroot.tex')