summaryrefslogtreecommitdiff
path: root/tests/test_eapi.sh
diff options
context:
space:
mode:
authorTiago Rezende Campos Falcao <developer@tiagofalcao.com>2010-10-27 14:38:40 +0000
committerTiago Rezende Campos Falcao <developer@tiagofalcao.com>2010-10-27 14:38:40 +0000
commit8687aedc100389012b816673a64053d7ff6eb364 (patch)
treeb2bf896cebb20368854e8020d681ad4469971326 /tests/test_eapi.sh
parent9875a4045afbe302fcedabc0fb988b9d61b58218 (diff)
Checkers for API consistence
SVN revision: 53918
Diffstat (limited to 'tests/test_eapi.sh')
-rwxr-xr-xtests/test_eapi.sh40
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/test_eapi.sh b/tests/test_eapi.sh
new file mode 100755
index 000000000..4a190e5c4
--- /dev/null
+++ b/tests/test_eapi.sh
@@ -0,0 +1,40 @@
1#!/bin/bash
2ret=0
3
4sed -n '/^EAPI /{n;p;}' src/lib/*.c >eapi.list
5
6for i in $(cat eapi.list|grep -o "^\w\+"); do
7 grep -q "\<$i\>" src/lib/elm_priv.h
8 if [ $? == 0 ]; then
9 echo -e "\e[31;1mEAPI in priv.h\e[m\t $i"
10 ret=1
11 fi
12
13 echo $i | grep -qe '^_\?elm_widget'
14 if [ $? == 0 ]; then
15 grep -qe "EAPI.*\<$i\>" src/lib/elm_widget.h
16 if [ $? != 0 ]; then
17 echo -e "\e[31;1m WIDGET missing in widget.h\e[m\t $i"
18 ret=1
19 fi
20 grep -qe "EAPI.*\<$i\>" src/lib/Elementary.h.in
21 if [ $? == 0 ]; then
22 echo -e "\e[31;1m WIDGET in Elm.h\e[m\t $i"
23 ret=1
24 fi
25 else
26 grep -qe "EAPI.*\<$i\>" src/lib/Elementary.h.in
27 if [ $? != 0 ]; then
28 echo -e "\e[31;1m ELM missing in Elm.h\e[m\t $i"
29 ret=1
30 fi
31 grep -qe "EAPI.*\<$i\>" src/lib/elm_widget.h
32 if [ $? == 0 ]; then
33 echo -e "\e[31;1m ELM in widget.h\e[m\t $i"
34 ret=1
35 fi
36 fi
37done
38
39rm eapi.list
40exit $ret