summaryrefslogtreecommitdiff
path: root/tests/unit/utils/test_utils.py
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2017-03-23 14:59:22 +0100
committerDaniel Schadt <kingdread@gmx.de>2017-03-23 18:16:15 +0100
commit3da21a32d2b31c4f486dac6f42fdadd0656ddf44 (patch)
tree96f83686d720017de9a86d3729bb8072c0786760 /tests/unit/utils/test_utils.py
parenta7d6cc6509889ce68a0bcbf5b4423d3721d39d23 (diff)
downloadqutebrowser-3da21a32d2b31c4f486dac6f42fdadd0656ddf44.tar.gz
qutebrowser-3da21a32d2b31c4f486dac6f42fdadd0656ddf44.zip
treat E: and E:\ the same when downloading
Fixes #2305
Diffstat (limited to 'tests/unit/utils/test_utils.py')
-rw-r--r--tests/unit/utils/test_utils.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/unit/utils/test_utils.py b/tests/unit/utils/test_utils.py
index 12330aa73..c60b640d6 100644
--- a/tests/unit/utils/test_utils.py
+++ b/tests/unit/utils/test_utils.py
@@ -916,3 +916,16 @@ class TestOpenFile:
def test_unused():
utils.unused(None)
+
+
+@pytest.mark.parametrize('path, expected', [
+ ('E:', 'E:\\'),
+ ('e:', 'e:\\'),
+ ('E:foo', 'E:foo'),
+ ('E:\\', 'E:\\'),
+ ('E:\\foo', 'E:\\foo'),
+ ('foo:', 'foo:'),
+ ('foo:bar', 'foo:bar'),
+])
+def test_expand_windows_drive(path, expected):
+ assert utils.expand_windows_drive(path) == expected