Skip to content

Commit

Permalink
test: updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lervag committed Aug 19, 2021
1 parent 2d91755 commit 908df27
Showing 1 changed file with 18 additions and 42 deletions.
60 changes: 18 additions & 42 deletions test/test-textobj/test-symbols.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit 908df27

Please sign in to comment.