Merge remote-tracking branch 'lenormf/failed-tests'
This commit is contained in:
commit
6873a44e3e
19
test/run
19
test/run
|
@ -16,6 +16,7 @@ main() {
|
||||||
cd $work/$dir;
|
cd $work/$dir;
|
||||||
indent="$(echo "${dir}/" | sed -e 's|[^/]*/\+| |g')"
|
indent="$(echo "${dir}/" | sed -e 's|[^/]*/\+| |g')"
|
||||||
name=$(basename $PWD)
|
name=$(basename $PWD)
|
||||||
|
should_fail=$(test ! -e error; echo $?)
|
||||||
if ! test -e cmd; then
|
if ! test -e cmd; then
|
||||||
echo "$indent$name"
|
echo "$indent$name"
|
||||||
elif test -x enabled && ! ./enabled; then
|
elif test -x enabled && ! ./enabled; then
|
||||||
|
@ -34,6 +35,10 @@ main() {
|
||||||
catch %{
|
catch %{
|
||||||
exec gg
|
exec gg
|
||||||
}
|
}
|
||||||
|
hook global RuntimeError .+ %{
|
||||||
|
nop %sh{echo '\$kak_hook_param' > stderr}
|
||||||
|
quit!
|
||||||
|
}
|
||||||
exec '$(cat cmd | sed -e s/\'/\\\\\'/g)'
|
exec '$(cat cmd | sed -e s/\'/\\\\\'/g)'
|
||||||
eval -buffer *debug* write debug
|
eval -buffer *debug* write debug
|
||||||
nop %sh{
|
nop %sh{
|
||||||
|
@ -46,6 +51,7 @@ main() {
|
||||||
"
|
"
|
||||||
${test}/../src/kak out -n -u -e "$kak_commands"
|
${test}/../src/kak out -n -u -e "$kak_commands"
|
||||||
retval=$?
|
retval=$?
|
||||||
|
if [ $should_fail = 0 ]; then
|
||||||
if [ $retval -ne 0 ]; then
|
if [ $retval -ne 0 ]; then
|
||||||
echo "Kakoune returned error $retval"
|
echo "Kakoune returned error $retval"
|
||||||
fi
|
fi
|
||||||
|
@ -72,6 +78,19 @@ main() {
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
else
|
||||||
|
color=green
|
||||||
|
if [ ! -e stderr ]; then
|
||||||
|
if [ $retval -eq 0 ]; then
|
||||||
|
color=red
|
||||||
|
number_failures=$(($number_failures + 1))
|
||||||
|
fi
|
||||||
|
elif [ -s error -a ! $(cmp -s error stderr) ]; then
|
||||||
|
color=yellow
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "$indent$name" | colorize $color normal
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if expr $number_failures > 0; then
|
if expr $number_failures > 0; then
|
||||||
|
|
Loading…
Reference in New Issue
Block a user