Fixed syntax and improved test

This commit is contained in:
Julian Weigt 2016-08-11 20:41:02 +02:00
parent 060a3998c6
commit 5913c55864
2 changed files with 9 additions and 9 deletions

View File

@ -1,16 +1,13 @@
<!DOCTYPE html>
<!-- target: hello.txt -->
<html>
<head>
<meta charset="utf-8">
<title>Many links</title>
<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>
<a href="/data/hello2.txt">2</a>
<a href="/data/hello3.txt">3</a>
</body>
</html>

View File

@ -114,11 +114,12 @@ def test_word_hints_issue1393(quteproc, tmpdir):
quteproc.send_cmd(':follow-hint {}'.format(hint))
quteproc.wait_for_load_finished('data/{}'.format(target))
def test_short_dict(quteproc,tmpdir):
def test_short_dict(quteproc, tmpdir):
dict_file = tmpdir / 'dict'
dict_file.write(textwrap.dedent("""
a
b
worda
wordb
"""))
quteproc.set_setting('hints', 'mode', 'word')
quteproc.set_setting('hints', 'dictionary', str(dict_file))
@ -127,3 +128,5 @@ def test_short_dict(quteproc,tmpdir):
line = quteproc.wait_for(message='Not enough words in the dictionary.')
line.expected = True
quteproc.wait_for(message='hints: *', category='hints')
quteproc.send_cmd(':follow-hint d')
quteproc.wait_for_load_finished('data/hello3.txt')