Update test run script, was not writing test name in some cases
This commit is contained in:
parent
131b0a8298
commit
544ec7e385
18
test/run
18
test/run
|
@ -56,18 +56,19 @@ main() {
|
||||||
rm -f /tmp/kakoune/$USER/$session
|
rm -f /tmp/kakoune/$USER/$session
|
||||||
${test}/../src/kak out -n -s "$session" -ui json -e "$kak_commands" > display
|
${test}/../src/kak out -n -s "$session" -ui json -e "$kak_commands" > display
|
||||||
retval=$?
|
retval=$?
|
||||||
if [ $should_fail = 0 ]; then
|
if [ $should_fail -eq 0 ]; then
|
||||||
if [ $retval -ne 0 ]; then
|
if [ $retval -ne 0 ]; then
|
||||||
echo "Kakoune returned error $retval"
|
echo "Kakoune returned error $retval"
|
||||||
number_failures=$(($number_failures + 1))
|
number_failures=$(($number_failures + 1))
|
||||||
echo "$indent$name" | colorize red normal
|
echo "$indent$name" | colorize red normal
|
||||||
else
|
else
|
||||||
|
failed=no
|
||||||
for expect in $test_files; do
|
for expect in $test_files; do
|
||||||
if cmp -s $test/$dir/$expect $expect; then
|
if ! cmp -s $test/$dir/$expect $expect; then
|
||||||
echo "$indent$name" | colorize green normal
|
if [ "$failed" = no ]; then
|
||||||
else
|
|
||||||
number_failures=$(($number_failures + 1))
|
|
||||||
echo "$indent$name" | colorize red normal
|
echo "$indent$name" | colorize red normal
|
||||||
|
failed=yes
|
||||||
|
fi
|
||||||
echo
|
echo
|
||||||
diff -u $test/$dir/$expect $expect | while read -r line; do
|
diff -u $test/$dir/$expect $expect | while read -r line; do
|
||||||
first_character=$(echo "$line" | cut -b 1)
|
first_character=$(echo "$line" | cut -b 1)
|
||||||
|
@ -79,6 +80,12 @@ main() {
|
||||||
esac
|
esac
|
||||||
echo "$line" | colorize $color normal
|
echo "$line" | colorize $color normal
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [ "$failed" = no ]; then
|
||||||
|
echo "$indent$name" | colorize green normal
|
||||||
|
else
|
||||||
|
number_failures=$(($number_failures + 1))
|
||||||
echo
|
echo
|
||||||
if test -e debug; then
|
if test -e debug; then
|
||||||
echo "debug buffer:" | colorize yellow normal
|
echo "debug buffer:" | colorize yellow normal
|
||||||
|
@ -86,7 +93,6 @@ main() {
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
color=green
|
color=green
|
||||||
|
|
Loading…
Reference in New Issue
Block a user