Update test run script, was not writing test name in some cases

This commit is contained in:
Maxime Coste 2016-03-17 11:37:35 +00:00
parent 131b0a8298
commit 544ec7e385

View File

@ -56,18 +56,19 @@ main() {
rm -f /tmp/kakoune/$USER/$session
${test}/../src/kak out -n -s "$session" -ui json -e "$kak_commands" > display
retval=$?
if [ $should_fail = 0 ]; then
if [ $should_fail -eq 0 ]; then
if [ $retval -ne 0 ]; then
echo "Kakoune returned error $retval"
number_failures=$(($number_failures + 1))
echo "$indent$name" | colorize red normal
else
failed=no
for expect in $test_files; do
if cmp -s $test/$dir/$expect $expect; then
echo "$indent$name" | colorize green normal
else
number_failures=$(($number_failures + 1))
if ! cmp -s $test/$dir/$expect $expect; then
if [ "$failed" = no ]; then
echo "$indent$name" | colorize red normal
failed=yes
fi
echo
diff -u $test/$dir/$expect $expect | while read -r line; do
first_character=$(echo "$line" | cut -b 1)
@ -79,6 +80,12 @@ main() {
esac
echo "$line" | colorize $color normal
done
fi
done
if [ "$failed" = no ]; then
echo "$indent$name" | colorize green normal
else
number_failures=$(($number_failures + 1))
echo
if test -e debug; then
echo "debug buffer:" | colorize yellow normal
@ -86,7 +93,6 @@ main() {
echo
fi
fi
done
fi
else
color=green