1
+ import sys
2
+
1
3
import pytest
2
4
3
- from conftest import assert_bash_exec , assert_complete
5
+ from conftest import assert_bash_exec , assert_complete , prepare_fixture_dir
4
6
5
7
6
8
@pytest .mark .bashcomp (ignore_env = r"^[+-]_comp_cmd_scp__path_esc=" )
@@ -9,8 +11,21 @@ class TestSshfs:
9
11
def test_1 (self , completion ):
10
12
assert completion
11
13
12
- @pytest .mark .complete ("sshfs local_path" , cwd = "sshfs" )
13
- def test_local_path_suffix_1 (self , completion ):
14
+ @pytest .fixture
15
+ def tmpdir_backslash (self , request , bash ):
16
+ if sys .platform .startswith ("win" ):
17
+ pytest .skip ("Filenames not allowed on Windows" )
18
+
19
+ tmpdir , _ , _ = prepare_fixture_dir (
20
+ request , files = ["local_path-file\\ " ], dirs = ["local_path-dir" ]
21
+ )
22
+ return tmpdir
23
+
24
+ def test_local_path_suffix_1 (self , bash , tmpdir_backslash ):
25
+ completion = assert_complete (
26
+ bash , "sshfs local_path" , cwd = tmpdir_backslash
27
+ )
28
+
14
29
assert completion == "-dir/"
15
30
16
31
def test_remote_path_ending_with_backslash (self , bash ):
0 commit comments