diff options
author | Daniel Schadt <kingdread@gmx.de> | 2017-03-23 14:59:22 +0100 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2017-03-23 18:16:15 +0100 |
commit | 3da21a32d2b31c4f486dac6f42fdadd0656ddf44 (patch) | |
tree | 96f83686d720017de9a86d3729bb8072c0786760 /tests/unit/utils/test_utils.py | |
parent | a7d6cc6509889ce68a0bcbf5b4423d3721d39d23 (diff) | |
download | qutebrowser-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.py | 13 |
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 |