Test for completion warnings with 1 item.

Add a regression test for #1600: Warnings from completionwidget when it
only has 1 item.

Addresses #1899.
This commit is contained in:
Ryan Roden-Corrent 2016-08-31 22:25:34 -04:00
parent 48fe309a48
commit 24a5bffbd8
2 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,7 @@
Feature: Command bar completion
Scenario: No warnings when completing with one entry (#1600)
Given I open about:blank
When I run :set-cmd-text -s :open
And I run :completion-item-focus next
Then no crash should happen

View File

@ -0,0 +1,21 @@
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016 Ryan Roden-Corrent (rcorre) <ryan@rcorre.net>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# qutebrowser is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
import pytest_bdd as bdd
bdd.scenarios('completion.feature')