Remove {downloaddir} in downloads.feature

We can just use (tmpdir) instead which we already use everywhere else as
well.
This commit is contained in:
Florian Bruhin 2016-09-10 16:23:01 +02:00
parent 0ba74ad023
commit b2d8905d68
2 changed files with 7 additions and 9 deletions

View File

@ -349,7 +349,7 @@ Feature: Downloading things from a website.
When I set storage -> prompt-download-directory to true
And I set completion -> download-path-suggestion to path
And I open data/downloads/download.bin
Then the download prompt should be shown with "{downloaddir}/"
Then the download prompt should be shown with "(tmpdir)/"
Scenario: completion -> download-path-suggestion = filename
When I set storage -> prompt-download-directory to true
@ -361,7 +361,7 @@ Feature: Downloading things from a website.
When I set storage -> prompt-download-directory to true
And I set completion -> download-path-suggestion to both
And I open data/downloads/download.bin
Then the download prompt should be shown with "{downloaddir}/download.bin"
Then the download prompt should be shown with "(tmpdir)/download.bin"
## storage -> remember-download-directory
@ -371,21 +371,19 @@ 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"
# (tmpdir) equals {downloaddir}
And I run :prompt-accept (tmpdir)/subdir
And I open data/downloads/download2.bin
Then the download prompt should be shown with "{downloaddir}/subdir/download2.bin"
Then the download prompt should be shown with "(tmpdir)/subdir/download2.bin"
Scenario: Not remembering the last download directory
When I set storage -> prompt-download-directory to true
And I set completion -> download-path-suggestion to both
And I set storage -> remember-download-directory to false
And I open data/downloads/download.bin
And I wait for the download prompt for "{downloaddir}/download.bin"
# (tmpdir) equals {downloaddir}
And I wait for the download prompt for "(tmpdir)/download.bin"
And I run :prompt-accept (tmpdir)/subdir
And I open data/downloads/download2.bin
Then the download prompt should be shown with "{downloaddir}/download2.bin"
Then the download prompt should be shown with "(tmpdir)/download2.bin"
# Overwriting files

View File

@ -69,7 +69,7 @@ def wait_for_download_finished_name(quteproc, name):
@bdd.when(bdd.parsers.parse('I wait for the download prompt for "{path}"'))
def wait_for_download_prompt(tmpdir, quteproc, path):
full_path = path.replace('{downloaddir}', str(tmpdir)).replace('/', os.sep)
full_path = path.replace('(tmpdir)', str(tmpdir)).replace('/', os.sep)
quteproc.wait_for(message=PROMPT_MSG.format(full_path))
@ -101,7 +101,7 @@ def download_size(filename, size, tmpdir):
@bdd.then(bdd.parsers.parse('The download prompt should be shown with '
'"{path}"'))
def download_prompt(tmpdir, quteproc, path):
full_path = path.replace('{downloaddir}', str(tmpdir)).replace('/', os.sep)
full_path = path.replace('(tmpdir)', str(tmpdir)).replace('/', os.sep)
quteproc.wait_for(message=PROMPT_MSG.format(full_path))
quteproc.send_cmd(':leave-mode')