5 if ! [ -f ai
/regression
/completeness.sh
]; then
6 echo "Make sure you are in the root of OpenTTD before starting this script."
10 cat ai
/regression
/tst_
*/main.nut |
tr ';' '\n' |
awk '
12 for (local in locals) {
15 if (match($0, "function Regression::Start") || match($0, "function Regression::Stop")) next
16 locals["this"] = "AIControllerSquirrel"
20 gsub(".*local", "local")
21 if (match($4, "^AI")) {
28 gsub(".*Valuate\\(", "")
36 for (local in locals) {
37 if (match($0, local ".")) {
38 fname = substr($0, index($0, local "."))
39 sub("\\(.*", "", fname)
40 sub("\\.", "::", fname)
41 sub(local, locals[local], fname)
43 if (match(locals[local], "List")) {
44 sub(locals[local], "AIAbstractList", fname)
49 # We want to remove everything before the FIRST occurence of AI.
50 # If we do not remove any other occurences of AI from the string
51 # we will remove everything before the LAST occurence of AI, so
52 # do some little magic to make it work the way we want.
56 if (match($0, "^AI") && match($0, ".")) {
62 ' |
sed 's/ //g' |
sort |
uniq > tmp.in_regression
64 grep 'DefSQ.*Method' ..
/src
/script
/api
/ai
/*.hpp.
sq |
grep -v 'AIError::' |
grep -v 'AIAbstractList::Valuate' |
grep -v '::GetClassName' |
sed 's/^[^,]*, &//g;s/,[^,]*//g' |
sort > tmp.in_api
66 diff -u tmp.in_regression tmp.in_api |
grep -v '^+++' |
grep '^+' |
sed 's/^+//'
68 rm -f tmp.in_regression tmp.in_api