tests: Fix vimwiki loading errors

Not only can we stop ignoring the errors, this also fixes
TestInfoActionNotTriggeredByEnterOnLink which would otherwise cause vim
to complain about g:vimwiki_wikilocal_vars not being available.
This commit is contained in:
Tomas Janousek 2020-06-28 23:21:42 +02:00 committed by Tomas Babej
parent 789d04f488
commit 698e2448f3
3 changed files with 6 additions and 6 deletions

View file

@ -26,7 +26,7 @@ let s:plugin_path = escape(expand('<sfile>:p:h:h:h'), '\')
" Run the measure parts first, if desired " Run the measure parts first, if desired
if exists("g:taskwiki_measure_coverage") if exists("g:taskwiki_measure_coverage")
execute 'py3file ' . s:plugin_path . '/knowledge/testcoverage.py' execute 'py3file ' . s:plugin_path . '/taskwiki/testcoverage.py'
endif endif
" Execute the main body of taskwiki source " Execute the main body of taskwiki source

View file

@ -22,10 +22,10 @@ class IntegrationTest(object):
tasks = [] tasks = []
markup = 'default' markup = 'default'
def add_plugin(self, name): def add_plugin(self, name, *args):
plugin_base = os.path.expanduser('~/.vim/bundle/') plugin_base = os.path.expanduser('~/.vim/bundle/')
plugin_path = os.path.join(plugin_base, name) plugin_path = os.path.join(plugin_base, name)
self.client.add_plugin(plugin_path) self.client.add_plugin(plugin_path, *args)
def write_buffer(self, lines, position=0): def write_buffer(self, lines, position=0):
result = self.client.write_buffer(position + 1, lines) result = self.client.write_buffer(position + 1, lines)
@ -92,10 +92,10 @@ class IntegrationTest(object):
self.configure_global_variables() self.configure_global_variables()
self.add_plugin('taskwiki') self.add_plugin('taskwiki')
self.add_plugin('vimwiki') self.add_plugin('vimwiki', 'plugin/vimwiki.vim')
self.filepath = os.path.join(self.dir, 'testwiki.txt') self.filepath = os.path.join(self.dir, 'testwiki.txt')
self.client.edit(self.filepath) self.client.edit(self.filepath)
self.command('set filetype=vimwiki', silent=None) # TODO: fix these vimwiki loading errors self.command('set filetype=vimwiki')
def teardown(self): def teardown(self):
if not self.client: if not self.client:

View file

@ -1370,7 +1370,7 @@ class TestSelectAfterBufferSwitch(IntegrationTest):
sleep(0.5) sleep(0.5)
self.command('split testwiki2.txt', silent=False) self.command('split testwiki2.txt', silent=False)
sleep(0.5) sleep(0.5)
self.command('set filetype=vimwiki', silent=False) self.command('set filetype=vimwiki')
sleep(0.5) sleep(0.5)
self.command('q!') self.command('q!')
sleep(0.5) sleep(0.5)