Mercurial > hg > release > thermostat-1.4
changeset 1780:bc7fff685867
Add some debugging info to bash-completion tests
Reviewed-by: jerboaa
Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2015-July/014907.html
PR2616
author | Omair Majid <omajid@redhat.com> |
---|---|
date | Mon, 27 Jul 2015 11:14:32 -0400 |
parents | cf40fa42b046 |
children | 3227fa662692 |
files | distribution/tools/verify-bash-completion.sh |
diffstat | 1 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/distribution/tools/verify-bash-completion.sh Fri Jul 24 15:16:30 2015 -0400 +++ b/distribution/tools/verify-bash-completion.sh Mon Jul 27 11:14:32 2015 -0400 @@ -39,11 +39,14 @@ # Tests for bash-completion set -e +set -x errors=0 TARGET="$(dirname $0)/../target" +echo "$BASH_VERSION" + # Join the supplied arguments into a single string using the specified separator # $1 : the separator # everything else: arguments to join @@ -92,11 +95,22 @@ input=$1 expected=$2 expected_pretty=$(echo $expected | __prettify) + echo "Testing $input" + __find_completion $input + # disable debugging output once to grab the actual output we need + set +x # save completions and any other output separately and check both __find_completion $input >${TARGET}/completion.actual 2>${TARGET}/completion.output + # enable debugging output to display more information + set -x actual=$(<${TARGET}/completion.actual) actual_pretty=$(echo "$actual" | __prettify) output=$(<${TARGET}/completion.output) + echo "Input: $input" + echo "Completion: $actual" + echo "Expected: $expected" + echo "Output: $output" + if [[ $actual == $expected && -z $output ]] ; then echo "[OK] '$input' => '$actual_pretty'" elif [[ -z $output ]]; then