diff --git a/test/test-textobj/test-symbols.vim b/test/test-textobj/test-symbols.vim index 05f9dd5048..06cdbfbe8a 100644 --- a/test/test-textobj/test-symbols.vim +++ b/test/test-textobj/test-symbols.vim @@ -7,45 +7,21 @@ set nomore setfiletype tex -call vimtex#test#keys('dax', - \ ['$Cx_0^{1/2} y$'], - \ ['$x_0^{1/2} y$']) -call vimtex#test#keys('ldax', - \ ['$Cx_0^{1/2} y$'], - \ ['$x_0^{1/2} y$']) -call vimtex#test#keys('lldax', - \ ['$Cx_0^{1/2} y$'], - \ ['$C y$']) - -call vimtex#test#keys('dax', - \ ['$e^{a x^3}$'], - \ ['$$']) -call vimtex#test#keys('fadax', - \ ['$e^{a x^3}$'], - \ ['$e^{ x^3}$']) -call vimtex#test#keys('fxdax', - \ ['$e^{a x^3}$'], - \ ['$e^{a }$']) - -call vimtex#test#keys('2ldax', - \ ['$\sin_k^{a x^3}$'], - \ ['$$']) -call vimtex#test#keys('fxdax', - \ ['$\sin_k^{a x^3}$'], - \ ['$\sin_k^{a }$']) - -call vimtex#test#keys('fadax', - \ ['$( asd )^{...}$'], - \ ['$( sd )^{...}$']) -call vimtex#test#keys('f}dax', - \ ['$( asd )^{...}$'], - \ ['$$']) - -call vimtex#test#keys('fsdax', - \ ['$\left( asd \right)^{...}$'], - \ ['$\left( ad \right)^{...}$']) -call vimtex#test#keys('fgdax', - \ ['$\left( asd \right)^{...}$'], - \ ['$$']) - -quit! +for [s:keys, s:input, s:expect] in [ + \ ['dax', '$Cx_0^{1/2} y$', '$x_0^{1/2} y$'], + \ ['ldax', '$Cx_0^{1/2} y$', '$x_0^{1/2} y$'], + \ ['lldax', '$Cx_0^{1/2} y$', '$C y$'], + \ ['dax', '$e^{a x^3}$', '$$'], + \ ['fadax', '$e^{a x^3}$', '$e^{ x^3}$'], + \ ['fxdax', '$e^{a x^3}$', '$e^{a }$'], + \ ['2ldax', '$\sin_k^{a x^3}$', '$$'], + \ ['fxdax', '$\sin_k^{a x^3}$', '$\sin_k^{a }$'], + \ ['fadax', '$( asd )^{...}$', '$( sd )^{...}$'], + \ ['f}dax', '$( asd )^{...}$', '$$'], + \ ['fsdax', '$\left( asd \right)^{...}$', '$\left( ad \right)^{...}$'], + \ ['fgdax', '$\left( asd \right)^{...}$', '$$'], + \] + call vimtex#test#keys(s:keys, s:input, s:expect) +endfor + +call vimtex#test#finished()