Skip to content

Commit

Permalink
test: replace some echos with printfs
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed May 11, 2020
1 parent febf177 commit bcdf00c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions test/t/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ def _avahi_hosts(bash: pexpect.spawn) -> List[str]:
def known_hosts(bash: pexpect.spawn) -> List[str]:
output = assert_bash_exec(
bash,
# TODO: why does printf instead of echo hang here?
'_known_hosts_real ""; echo "${COMPREPLY[@]}"; unset COMPREPLY',
'_known_hosts_real ""; '
r'printf "%s\n" "${COMPREPLY[@]}"; unset COMPREPLY',
want_output=True,
)
return sorted(set(output.split()))
Expand Down
4 changes: 2 additions & 2 deletions test/t/unit/test_unit_known_hosts_real.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ def test_basic(
output = assert_bash_exec(
bash,
"_known_hosts_real -a%sF _known_hosts_real/config '%s'; "
# TODO: why does printf instead of echo hang here?
'echo "${COMPREPLY[@]}"; unset COMPREPLY' % (colon_flag, prefix),
r'printf "%%s\n" "${COMPREPLY[@]}"; unset COMPREPLY'
% (colon_flag, prefix),
want_output=True,
)
assert sorted(output.split()) == sorted(expected)

0 comments on commit bcdf00c

Please sign in to comment.