Improve output if :messages is used without errors
This commit is contained in:
parent
b704c911ae
commit
9b28d90543
@ -37,6 +37,8 @@ th, td {
|
||||
<table>
|
||||
{{ content | safe() }}
|
||||
</table>
|
||||
{% elif content is not none %}
|
||||
<p>No messages to show.</p>
|
||||
{% else %}
|
||||
<p>Log output was disabled.</p>
|
||||
{% endif %}
|
||||
|
@ -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."
|
||||
|
@ -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.'
|
||||
|
Loading…
Reference in New Issue
Block a user