(svn r9296) [NoAI] -Fix: regression test now replaced 0x(nil) with 0x0000000 to make everything the same on all platforms
[NoAI] -Add: added -k to regression test run.sh script to keep tmp.regression
#!/bin/sh
if ! [ -f ai/regression/main.nut ]; then
echo "Make sure you are in the root of OpenTTD before starting this script."
exit 1
fi
if [ -n "`cat ai/regression/main.nut | grep '//iFRegression <-FRegression();'`" ]; then
echo "Enable the Regression AI before starting the regression test."
echo "Also disable any other AI. Check main.nut in ai/regression for"
echo "more information about this."
exit 1
fi
./openttd -x -c ai/regression/regression.cfg -snull -mnull -vnull -g ai/regression/regression.sav | sed 's/0x(nil)/0x00000000/g' > tmp.regression
res="`diff -u ai/regression/regression.txt tmp.regression`"
if [ -z "$res" ]; then
echo "Regression test passed!"
else
echo "Regression test failed! Difference:"
echo "$res"
fi
echo ""
echo "Regression test done"
if [ "$1" != "-k" ]; then
rm -f tmp.regression
fi