Fix download tests on Windows

This commit is contained in:
Florian Bruhin 2016-09-11 15:53:46 +02:00
parent 1c09649dcb
commit 11ee5befcc
2 changed files with 5 additions and 3 deletions

View File

@ -19,6 +19,7 @@
"""Steps for bdd-like tests."""
import os
import re
import sys
import time
@ -222,6 +223,7 @@ def run_command(quteproc, httpbin, tmpdir, command):
command = command.replace('(port)', str(httpbin.port))
command = command.replace('(testdata)', utils.abs_datapath())
command = command.replace('(tmpdir)', str(tmpdir))
command = command.replace('(dirsep)', os.sep)
quteproc.send_cmd(command, count=count, invalid=invalid)

View File

@ -371,7 +371,7 @@ Feature: Downloading things from a website.
And I set storage -> remember-download-directory to true
And I open data/downloads/download.bin
And I wait for the download prompt for "*/download.bin"
And I run :prompt-accept (tmpdir)/subdir
And I run :prompt-accept (tmpdir)(dirsep)subdir
And I open data/downloads/download2.bin
Then the download prompt should be shown with "(tmpdir)/subdir/download2.bin"
@ -381,7 +381,7 @@ Feature: Downloading things from a website.
And I set storage -> remember-download-directory to false
And I open data/downloads/download.bin
And I wait for the download prompt for "(tmpdir)/download.bin"
And I run :prompt-accept (tmpdir)/subdir
And I run :prompt-accept (tmpdir)(dirsep)subdir
And I open data/downloads/download2.bin
Then the download prompt should be shown with "(tmpdir)/download2.bin"
@ -420,7 +420,7 @@ Feature: Downloading things from a website.
When I set storage -> prompt-download-directory to false
And I run :download http://localhost:(port)/redirect/12 --dest redirection
Then the error "Download error: Maximum redirection count reached!" should be shown
And "Deleted */redirection" should be logged
And "Deleted *redirection" should be logged
And the downloaded file redirection should not exist
Scenario: Downloading with redirect to itself