(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
--- a/bin/ai/regression/regression.txt Sun Mar 18 21:12:50 2007 +0000
+++ b/bin/ai/regression/regression.txt Sun Mar 18 21:22:48 2007 +0000
@@ -25,7 +25,7 @@
--AICargo--
Cargo -1
- GetCargoLabel(): '(null : 0x(nil))'
+ GetCargoLabel(): '(null : 0x00000000)'
IsFreight(): false
GetCargoIncome(0, 0): 0
GetCargoIncome(10, 10): 0
@@ -116,21 +116,21 @@
GetCargoIncome(100, 10): 0
GetCargoIncome(10, 100): 0
Cargo 12
- GetCargoLabel(): '(null : 0x(nil))'
+ GetCargoLabel(): '(null : 0x00000000)'
IsFreight(): false
GetCargoIncome(0, 0): 0
GetCargoIncome(10, 10): 0
GetCargoIncome(100, 10): 0
GetCargoIncome(10, 100): 0
Cargo 13
- GetCargoLabel(): '(null : 0x(nil))'
+ GetCargoLabel(): '(null : 0x00000000)'
IsFreight(): false
GetCargoIncome(0, 0): 0
GetCargoIncome(10, 10): 0
GetCargoIncome(100, 10): 0
GetCargoIncome(10, 100): 0
Cargo 14
- GetCargoLabel(): '(null : 0x(nil))'
+ GetCargoLabel(): '(null : 0x00000000)'
IsFreight(): false
GetCargoIncome(0, 0): 0
GetCargoIncome(10, 10): 0
@@ -160,7 +160,7 @@
GetIndustryCount(): 69
Industry -1
IsValidIndustry(): false
- GetName(): (null : 0x(nil))
+ GetName(): (null : 0x00000000)
GetLocation(): 4294967295
Industry 0
IsValidIndustry(): true
@@ -440,11 +440,11 @@
GetLocation(): 44181
Industry 69
IsValidIndustry(): false
- GetName(): (null : 0x(nil))
+ GetName(): (null : 0x00000000)
GetLocation(): 4294967295
Industry 70
IsValidIndustry(): false
- GetName(): (null : 0x(nil))
+ GetName(): (null : 0x00000000)
GetLocation(): 4294967295
Valid Industries: 69
GetIndustryCount(): 69
@@ -469,7 +469,7 @@
GetTownCount(): 28
Town -1
IsValidTown(): false
- GetName(): (null : 0x(nil))
+ GetName(): (null : 0x00000000)
GetPopulation(): 0
GetLocation(): 4294967295
Town 0
@@ -614,17 +614,17 @@
GetLocation(): 45525
Town 28
IsValidTown(): false
- GetName(): (null : 0x(nil))
+ GetName(): (null : 0x00000000)
GetPopulation(): 0
GetLocation(): 4294967295
Town 29
IsValidTown(): false
- GetName(): (null : 0x(nil))
+ GetName(): (null : 0x00000000)
GetPopulation(): 0
GetLocation(): 4294967295
Town 30
IsValidTown(): false
- GetName(): (null : 0x(nil))
+ GetName(): (null : 0x00000000)
GetPopulation(): 0
GetLocation(): 4294967295
Valid Industries: 28
--- a/bin/ai/regression/run.sh Sun Mar 18 21:12:50 2007 +0000
+++ b/bin/ai/regression/run.sh Sun Mar 18 21:22:48 2007 +0000
@@ -12,7 +12,7 @@
exit 1
fi
-./openttd -x -c ai/regression/regression.cfg -snull -mnull -vnull -g ai/regression/regression.sav > tmp.regression
+./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!"
@@ -23,4 +23,6 @@
echo ""
echo "Regression test done"
-rm -f tmp.regression
+if [ "$1" != "-k" ]; then
+ rm -f tmp.regression
+fi