From 820b7c260215249ef24cb8c9290fa0af82285f89 Mon Sep 17 00:00:00 2001 From: Freddy Vulto Date: Fri, 30 Oct 2009 17:18:43 +0100 Subject: [PATCH] (testsuite) Fix _known_hosts_real Clear COMPREPLY after test now that _known_hosts_real is appending instead of setting COMPREPLY. --- test/lib/library.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/lib/library.sh b/test/lib/library.sh index 1852c9b2..b4285f19 100644 --- a/test/lib/library.sh +++ b/test/lib/library.sh @@ -16,10 +16,13 @@ diff_env() { # Output array elements, sorted and separated by newline +# Unset variable after outputting. # @param $1 Name of array variable to process +# @param $2 -u (optional) Unset variable after echo echo_array() { local IFS=$'\n' - eval echo \"\${$1[*]}\" | sort + eval printf "%s" \"\${$1[*]}\" | sort + unset -v $1 }