| 1 |
lars |
1 |
#!/bin/bash
|
|
|
2 |
|
|
|
3 |
# Output all unit test files that have a name that does not match the
|
|
|
4 |
# directory they are stored in.
|
|
|
5 |
# Note: a unit test's name is stored in the second line of phpt file;
|
|
|
6 |
# all names start with XML_Query2XML::<METHOD_NAME>; <METHOD_NAME>
|
|
|
7 |
# should be equal to the directory name.
|
|
|
8 |
|
|
|
9 |
cd `dirname $0` || exit 1
|
|
|
10 |
|
|
|
11 |
grep -R '^XML_Query2XML::' DB/ | awk -F: '{print $1 " " $4}' | \
|
|
|
12 |
awk -F'(' '{print $1}' | while read FILE FUNCTION;
|
|
|
13 |
do
|
|
|
14 |
DIR=$(basename `dirname $FILE`);
|
|
|
15 |
if [ "$DIR" != "$FUNCTION" ] ; then
|
|
|
16 |
echo $FILE: $FUNCTION
|
|
|
17 |
fi
|
|
|
18 |
done
|
|
|
19 |
|