[Scroller] Fix the calculation double type number. Round off to the nearest whole...
[framework/uifw/elementary.git] / tests / test_eapi.sh
1 #!/bin/bash
2 ret=0
3
4 sed -n '/^EAPI /{n;p;}' src/lib/*.c >eapi.list
5
6 for 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
37 done
38
39 rm eapi.list
40 exit $ret