Skip to content

Commit 4847f8d

Browse files
committed
test(scp): leave comments for a failing test case
1 parent b653f4d commit 4847f8d

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

completions/ssh

+7
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,13 @@ _comp_cmd_scp__path_esc='[][(){}<>"'"'"',:;^&!$=?`\\|[:space:]]'
471471
# "compopt +o nospace" instead, but it would suffix a space to directory names
472472
# unexpectedly.
473473
#
474+
# FIXME: With the current strategy of using "ls -FL", we cannot distinguish the
475+
# filenames that end with one of the type-classifier characters. For example,
476+
# a regular file "pipe|" and a named pipe "pipe" would both produce the
477+
# identical result "pipe|" with "ls -1FL". As a consequence, those characters
478+
# at the end of the filename are removed unexpectedly. To solve this problem,
479+
# we need to give up relying on "ls -1FL".
480+
#
474481
# @param $1 dirs_only - If a non-empty value is specified, only directory names
475482
# are selected.
476483
# @param $2 escape_replacement - If a non-empty value is specified, special

test/t/test_scp.py

+12-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,11 @@ def test_xfunc_remote_files(self, bash):
157157

158158
@pytest.fixture
159159
def tmpdir_mkfifo(self, request, bash):
160-
tmpdir, _, _ = prepare_fixture_dir(request, files=[], dirs=[])
160+
tmpdir, _, _ = prepare_fixture_dir(
161+
request,
162+
files=["local_path_2-pipe|"],
163+
dirs=[],
164+
)
161165

162166
try:
163167
assert_bash_exec(bash, "mkfifo '%s/local_path_1-pipe'" % tmpdir)
@@ -175,6 +179,13 @@ def test_local_path_mark_1(self, bash, tmpdir_mkfifo):
175179
)
176180
assert completion == "pipe"
177181

182+
# FIXME: This test currently fails.
183+
# def test_local_path_mark_2(self, bash, tmpdir_mkfifo):
184+
# completion = assert_complete(
185+
# bash, "scp local_path_2-", cwd=tmpdir_mkfifo
186+
# )
187+
# assert completion == "pipe\\|"
188+
178189
@pytest.mark.complete("scp spa", cwd="scp")
179190
def test_local_path_with_spaces_1(self, completion):
180191
assert completion == "ced\\ \\ conf"

0 commit comments

Comments
 (0)