diff --git a/tests/end2end/data/hints/short_dict.html b/tests/end2end/data/hints/short_dict.html new file mode 100644 index 000000000..ced3e2eb2 --- /dev/null +++ b/tests/end2end/data/hints/short_dict.html @@ -0,0 +1,16 @@ + + + + + + + + Many links + + + 1 + 2 + 3 + 4 + + diff --git a/tests/end2end/test_hints_html.py b/tests/end2end/test_hints_html.py index 58a19eb21..a19b6e3d6 100644 --- a/tests/end2end/test_hints_html.py +++ b/tests/end2end/test_hints_html.py @@ -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')