qutebrowser/tests/end2end/features/spawn.feature

74 lines
3.1 KiB
Gherkin
Raw Normal View History

# vim: ft=cucumber fileencoding=utf-8 sts=4 sw=4 et:
Feature: :spawn
Scenario: Running :spawn
When I run :spawn -v (echo-exe) "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: Starting a userscript which doesn't exist
When I run :spawn -u this_does_not_exist
Then the error "Userscript 'this_does_not_exist' not found in userscript directories *" should be shown
Scenario: Starting a userscript with absoloute path which doesn't exist
When I run :spawn -u /this_does_not_exist
Then the error "Userscript '/this_does_not_exist' not found" should be shown
2017-02-05 00:13:11 +01:00
# https://github.com/qutebrowser/qutebrowser/issues/1614
@posix
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-exe) {url}
Then "Executing * with args ['about:blank'], userscript=False" should be logged
2016-04-20 16:58:14 +02:00
Scenario: Running :spawn with url variable in fully encoded format
When I open data/title with spaces.html
And I run :spawn (echo-exe) {url}
Then "Executing * with args ['http://localhost:(port)/data/title%20with%20spaces.html'], userscript=False" should be logged
2016-04-20 16:58:14 +02:00
Scenario: Running :spawn with url variable in pretty decoded format
When I open data/title with spaces.html
And I run :spawn (echo-exe) {url:pretty}
Then "Executing * with args ['http://localhost:(port)/data/title with spaces.html'], userscript=False" should be logged
2016-04-20 16:58:14 +02:00
@posix
Scenario: Running :spawn with userscript
2017-11-22 08:43:47 +01:00
When I open data/hello.txt
And I run :spawn -u (testdata)/userscripts/open_current_url
2017-11-22 08:43:47 +01:00
And I wait until data/hello.txt is loaded
Then the following tabs should be open:
2017-11-22 08:43:47 +01:00
- data/hello.txt
- data/hello.txt (active)
2016-09-06 20:33:48 +02:00
2018-08-12 22:31:12 +02:00
@posix
Scenario: Running :spawn with userscript and count
When I run :spawn -u (testdata)/userscripts/hello_if_count with count 5
Then the message "Count is five!" should be shown
@posix
Scenario: Running :spawn with userscript and no count
When I run :spawn -u (testdata)/userscripts/hello_if_count
Then the message "No count!" should be shown
2016-09-06 18:41:24 +02:00
@windows
Scenario: Running :spawn with userscript on Windows
2017-11-22 08:43:47 +01:00
When I open data/hello.txt
2016-09-06 18:41:24 +02:00
And I run :spawn -u (testdata)/userscripts/open_current_url.bat
2017-11-22 08:43:47 +01:00
And I wait until data/hello.txt is loaded
2016-09-06 18:41:24 +02:00
Then the following tabs should be open:
2017-11-22 08:43:47 +01:00
- data/hello.txt
- data/hello.txt (active)
@posix
Scenario: Running :spawn with userscript that expects the stdin getting closed
2017-04-12 07:32:40 +02:00
When I run :spawn -u (testdata)/userscripts/stdinclose.py
Then the message "stdin closed" should be shown