Cf. #604: Added vader test
This commit is contained in:
parent
c79e7afb3b
commit
aa60cda284
33
test/vader/fold.vader
Normal file
33
test/vader/fold.vader
Normal file
@ -0,0 +1,33 @@
|
||||
Execute (Setup):
|
||||
let g:vimtex_fold_enabled = 1
|
||||
|
||||
Given tex (fold: commands):
|
||||
\documentclass{article}
|
||||
|
||||
\newenvironment{ccd}{%
|
||||
\begin{centered}\begin{tikzcd}}
|
||||
{\end{tikzcd}\end{centered}%
|
||||
}
|
||||
|
||||
\newenvironment{ccd}
|
||||
{\begin{centered}\begin{tikzcd}}
|
||||
{\end{tikzcd}\end{centered}}
|
||||
|
||||
% this should not be folded.
|
||||
\begin{document}
|
||||
|
||||
\end{document}
|
||||
|
||||
Execute (fold: verify):
|
||||
VimtexReload
|
||||
AssertEqual foldlevel(1), 1, 'preamble start'
|
||||
AssertEqual foldlevel(3), 2, 'newenvironment start'
|
||||
AssertEqual foldlevel(6), 2, 'newenvironment end pre'
|
||||
AssertEqual foldlevel(7), 1, 'newenvironment end post'
|
||||
AssertEqual foldlevel(8), 1, 'newenvironment - not folded'
|
||||
AssertEqual foldlevel(12), 1, 'preamble end pre'
|
||||
AssertEqual foldlevel(13), 0, 'preamble end post'
|
||||
|
||||
Given:
|
||||
Execute (Cleanup):
|
||||
unlet g:vimtex_fold_enabled
|
Loading…
Reference in New Issue
Block a user