Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
small improvements to testing experience
Allow flags to be passed to scripts/test easily in the Makefile.

Do not clear variables named g:go_loaded_ at the end of each test,
because these variables indicate whether filetype plugins have been
loaded.
  • Loading branch information
bhcleek committed Oct 3, 2020
1 parent e8da362 commit de1596d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Makefile
@@ -1,4 +1,5 @@
VIMS ?= vim-8.0 vim-8.2 nvim
TEST_FLAGS ?=

all: install lint test

Expand All @@ -12,7 +13,7 @@ install:
test:
@echo "==> Running tests for $(VIMS)"
@for vim in $(VIMS); do \
./scripts/test $$vim; \
./scripts/test $(TEST_FLAGS) $$vim; \
done

lint:
Expand Down
2 changes: 1 addition & 1 deletion scripts/runtest.vim
Expand Up @@ -32,7 +32,7 @@ endfunction
function! s:clearOptions() abort
" clear all the vim-go options
for l:k in keys(g:)
if l:k =~ '^go_'
if l:k =~ '^go_' && l:k !~ '^go_loaded_'
call execute(printf('unlet g:%s', l:k))
endif
endfor
Expand Down

0 comments on commit de1596d

Please sign in to comment.