tests: Test proper precise detection of vimwiki links

This commit is contained in:
Tomas Babej 2017-01-11 11:17:39 +01:00
parent 8a5306e4c2
commit 4b55082413
2 changed files with 27 additions and 1 deletions

View file

@ -355,6 +355,31 @@ class TestInfoActionTriggeredByEnter(IntegrationTest):
assert re.search(data2, output, re.MULTILINE)
class TestInfoActionNotTriggeredByEnterOnLink(IntegrationTest):
viminput = """
* [ ] [[link task]] 1 #{uuid}
* [ ] test task 2 #{uuid}
"""
tasks = [
dict(description="[[link task]] 1"),
dict(description="test task 2"),
]
def execute(self):
self.client.type('1gg')
self.client.type('10l')
self.client.feedkeys("\\<CR>")
sleep(0.5)
# Make sure we have been sent to a new buffer
output = '\n'.join(self.read_buffer())
assert not self.py("print(vim.current.buffer)", silent=False).startswith("<buffer info")
assert not output
class TestInfoActionMoved(IntegrationTest):
viminput = """