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

View File

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