bdd: Add some misc. tests.

This commit is contained in:
Florian Bruhin 2015-11-10 06:33:47 +01:00
parent 2fc1612bd4
commit 3fac74656e
2 changed files with 49 additions and 0 deletions

View File

@ -0,0 +1,28 @@
Feature: Various utility commands.
Scenario: :set-cmd-text and :command-accept
When I run :set-cmd-text :message-info "Hello World"
And I run :command-accept
Then the message "Hello World" should be shown.
Scenario: :set-cmd-text with two commands
When I run :set-cmd-text :message-info test ;; message-error error
And I run :command-accept
Then the message "test" should be shown.
And the error "error" should be shown.
Scenario: :set-cmd-text with invalid command
When I run :set-cmd-text foo
Then the error "Invalid command text 'foo'." should be shown.
Scenario: :message-error
When I run :message-error "Hello World"
Then the error "Hello World" should be shown.
Scenario: :message-info
When I run :message-info "Hello World"
Then the message "Hello World" should be shown.
Scenario: :message-warning
When I run :message-warning "Hello World"
Then the warning "Hello World" should be shown.

View File

@ -0,0 +1,21 @@
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2015 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# 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('misc.feature')