Added test to check handling of the case of a too small dictionary
This commit is contained in:
parent
d4f30bd100
commit
6973c93fa7
16
tests/end2end/data/hints/short_dict.html
Normal file
16
tests/end2end/data/hints/short_dict.html
Normal file
@ -0,0 +1,16 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<!-- target: hello.txt -->
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Many links</title>
|
||||
</head>
|
||||
<body>
|
||||
<a href="/data/hello.txt">1</a>
|
||||
<a href="/data/hello.txt">2</a>
|
||||
<a href="/data/hello.txt">3</a>
|
||||
<a href="/data/hello.txt">4</a>
|
||||
</body>
|
||||
</html>
|
@ -113,3 +113,17 @@ def test_word_hints_issue1393(quteproc, tmpdir):
|
||||
quteproc.wait_for(message='hints: *', category='hints')
|
||||
quteproc.send_cmd(':follow-hint {}'.format(hint))
|
||||
quteproc.wait_for_load_finished('data/{}'.format(target))
|
||||
|
||||
def test_short_dict(quteproc,tmpdir):
|
||||
dict_file = tmpdir / 'dict'
|
||||
dict_file.write(textwrap.dedent("""
|
||||
a
|
||||
b
|
||||
"""))
|
||||
quteproc.set_setting('hints', 'mode', 'word')
|
||||
quteproc.set_setting('hints', 'dictionary', str(dict_file))
|
||||
quteproc.open_path('data/hints/short_dict.html')
|
||||
quteproc.send_cmd(':hint')
|
||||
line = quteproc.wait_for(message='Not enough words in the dictionary.')
|
||||
line.expected = True
|
||||
quteproc.wait_for(message='hints: *', category='hints')
|
||||
|
Loading…
Reference in New Issue
Block a user