Skip to content

Commit

Permalink
test: add failing tests for symbols textobj
Browse files Browse the repository at this point in the history
  • Loading branch information
lervag committed Apr 7, 2021
1 parent cd53ba1 commit 837d8a3
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test/test-textobj/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ TESTS := $(TESTS:.vim=)

.PHONY: test $(TESTS)

test: $(TESTS)
test: $(filter-out test-symbols,$(TESTS))

$(TESTS):
@$(MYVIM) -u $@.vim
51 changes: 51 additions & 0 deletions test/test-textobj/test-symbols.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
set nocompatible
let &rtp = '../..,' . &rtp
filetype plugin on
syntax on

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!

0 comments on commit 837d8a3

Please sign in to comment.