Update test run script, was not writing test name in some cases
This commit is contained in:
parent
131b0a8298
commit
544ec7e385
30
test/run
30
test/run
|
@ -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))
|
||||
echo "$indent$name" | colorize red normal
|
||||
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,14 +80,19 @@ main() {
|
|||
esac
|
||||
echo "$line" | colorize $color normal
|
||||
done
|
||||
echo
|
||||
if test -e debug; then
|
||||
echo "debug buffer:" | colorize yellow normal
|
||||
cat debug
|
||||
echo
|
||||
fi
|
||||
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
|
||||
cat debug
|
||||
echo
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
else
|
||||
color=green
|
||||
|
|
Loading…
Reference in New Issue
Block a user