diff --git a/qutebrowser/html/log.html b/qutebrowser/html/log.html index bf6663ea0..4e5b28069 100644 --- a/qutebrowser/html/log.html +++ b/qutebrowser/html/log.html @@ -37,6 +37,8 @@ th, td { {{ content | safe() }}
+{% elif content is not none %} +

No messages to show.

{% else %}

Log output was disabled.

{% endif %} diff --git a/tests/integration/features/misc.feature b/tests/integration/features/misc.feature index d9376fd96..372bcf48a 100644 --- a/tests/integration/features/misc.feature +++ b/tests/integration/features/misc.feature @@ -426,3 +426,8 @@ Feature: Various utility commands. Scenario: Using qute:plainlog directly When I open qute:plainlog Then no crash should happen + + Scenario: Using :messages without messages + Given I have a fresh instance + When I run :messages + Then the page should contain the plaintext "No messages to show." diff --git a/tests/integration/test_invocations.py b/tests/integration/test_invocations.py index b987d9416..a77857405 100644 --- a/tests/integration/test_invocations.py +++ b/tests/integration/test_invocations.py @@ -85,3 +85,12 @@ def test_ascii_locale(httpbin, tmpdir, quteproc_new): assert len(tmpdir.listdir()) == 1 assert (tmpdir / '?-issue908.bin').exists() + + +def test_no_loglines(quteproc_new): + """Test qute:log with --loglines=0.""" + quteproc_new.start(args=['--debug', '--no-err-windows', '--temp-basedir', + '--loglines=0', 'about:blank']) + quteproc_new.open_path('qute:log') + quteproc_new.wait_for_load_finished('qute:log') + assert quteproc_new.get_content() == 'Log output was disabled.'