Implement a feature test for :hint all userscript.

This adds a (testdata) substitution for 'When I run {command}' to allow
providing an absolute path for the userscript.
This commit is contained in:
Ryan Roden-Corrent 2016-05-24 20:25:34 -04:00
parent 648f89ef31
commit db09cbb960
3 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,3 @@
#!/bin/bash
echo "message-info '$QUTE_SELECTED_TEXT'" >> "$QUTE_FIFO"

View File

@ -128,6 +128,7 @@ def run_command(quteproc, httpbin, command):
else:
count = None
command = command.replace('(port)', str(httpbin.port))
command = command.replace('(testdata)', utils.abs_datapath())
quteproc.send_cmd(command, count=count)

View File

@ -75,6 +75,13 @@ Feature: Using hints
And I press the key "<Enter>"
Then the message "http://localhost:(port)/data/hello.txt" should be shown
@posix
Scenario: Using :hint userscript
When I open data/hints/html/simple.html
And I run :hint all userscript (testdata)/userscripts/echo_hint_text
And I run :follow-hint a
Then the message "Follow me!" should be shown
Scenario: Yanking to primary selection without it being supported (#1336)
When selection is not supported
And I run :debug-set-fake-clipboard