diff --git a/tests/integration/features/spawn.feature b/tests/integration/features/spawn.feature new file mode 100644 index 000000000..5ebd4f4a3 --- /dev/null +++ b/tests/integration/features/spawn.feature @@ -0,0 +1,17 @@ +Feature: :spawn + + Scenario: Running :spawn + When I run :spawn -v echo "Hello" + Then the message "Command exited successfully." should be shown + + Scenario: Running :spawn with command that does not exist + When I run :spawn command_does_not_exist127623 + Then the error "Error while spawning command: The process failed to start." should be shown + + Scenario: Running :spawn with invalid quoting + When I run :spawn """ + Then the error "Error while splitting command: No closing quotation" should be shown + + Scenario: Running :spawn with url variable + When I run :spawn echo {url} + Then "Executing echo with args ['about:blank'], userscript=False" should be logged diff --git a/tests/integration/features/test_spawn.py b/tests/integration/features/test_spawn.py new file mode 100644 index 000000000..8f7e62259 --- /dev/null +++ b/tests/integration/features/test_spawn.py @@ -0,0 +1,22 @@ +# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: + +# Copyright 2015-2016 Florian Bruhin (The Compiler) +# +# 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 . + +import pytest_bdd as bdd +bdd.scenarios('spawn.feature') +