summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTiago Rezende Campos Falcao <developer@tiagofalcao.com>2010-11-02 11:26:44 +0000
committerTiago Rezende Campos Falcao <developer@tiagofalcao.com>2010-11-02 11:26:44 +0000
commitcd61ca17e74c98be9bb82c07f4ffd0e4597cc053 (patch)
tree25b0f721abf44e1492e0a80bedf8ccadde20f82e /tests
parent51fb1fbae941ec66791f8d9eca7e95e951e87d6d (diff)
Add test and checker to widget items
SVN revision: 54089
Diffstat (limited to 'tests')
-rwxr-xr-xtests/test_decl.sh58
1 files changed, 39 insertions, 19 deletions
diff --git a/tests/test_decl.sh b/tests/test_decl.sh
index c317f50..ca86eba 100755
--- a/tests/test_decl.sh
+++ b/tests/test_decl.sh
@@ -24,36 +24,62 @@ check(){
24 fi 24 fi
25 25
26 func=$(echo $i | grep -oe 'elm_\w\+') 26 func=$(echo $i | grep -oe 'elm_\w\+')
27 ass=$(sed '2q;d' eapi.decl)
27 28
28 sed '2q;d' eapi.decl | grep -qe "elm_widget\w\+(\(const \)\?Evas_Object \*" 29 echo $i | grep -qe "^elm_object"
29 if [ $? == 0 ];then 30 if [ $? == 0 ];then
30 tail -n9 eapi.decl | grep -q "\(API_ENTRY\|_elm_widget_is\)" 31 rm eapi.decl
31 if [ $? != 0 ];then
32 echo -e "\e[31;1mMISSING CHECKER\e[m\t $i"
33 ret=1
34 fi
35 return 32 return
36 fi 33 fi
37 34
38 sed '2q;d' eapi.decl | grep -qe "elm_object_\w\+(" 35 echo $i | grep -qe "^elm_widget"
39 if [ $? == 0 ];then 36 if [ $? == 0 ];then
40 rm eapi.decl 37
41 return 38 echo $ass | grep -qe "elm_widget\w\+(\(const \)\?Evas_Object \*"
39 if [ $? == 0 ];then
40 tail -n9 eapi.decl | grep -q "\(API_ENTRY\|_elm_widget_is\)"
41 if [ $? != 0 ];then
42 echo -e "\e[31;1mMISSING CHECKER\e[m\t $i"
43 ret=1
44 fi
45 return
46 fi
47
48 echo $ass | grep -qe "elm_widget\w\+(\(const \)\?Elm_ \*"
49 if [ $? == 0 ];then
50 tail -n9 eapi.decl | grep -qe "ELM_WIDGET_ITEM_CHECK"
51 if [ $? != 0 ];then
52 echo -e "\e[31;1mMISSING CHECKER\e[m\t $i"
53 ret=1
54 fi
55 return
56 fi
42 fi 57 fi
43 58
44 sed '2q;d' eapi.decl | grep -qe "elm_\w\+_add(" 59 echo $ass | grep -qe "elm_\w\+_add"
45 if [ $? == 0 ];then 60 if [ $? == 0 ];then
46 rm eapi.decl 61 echo -e "\e[32;1m???\e[m\t $i"
47 return 62 return
48 fi 63 fi
49 64
50 sed '2q;d' eapi.decl | grep -qe "elm_\w\+(\(const \)\?Evas_Object \*" 65 echo $ass | grep -qe "elm_\w\+(\(const \)\?Evas_Object \*"
51 if [ $? == 0 ];then 66 if [ $? == 0 ];then
52 tail -n9 eapi.decl | grep -q "ELM_CHECK_WIDTYPE" 67 tail -n9 eapi.decl | grep -q "ELM_CHECK_WIDTYPE"
53 if [ $? != 0 ];then 68 if [ $? != 0 ];then
54 echo -e "\e[31;1mMISSING CHECKER\e[m\t $i" 69 echo -e "\e[31;1mMISSING CHECKER\e[m\t $i"
55 ret=1 70 ret=1
56 fi 71 fi
72 return
73 fi
74
75 echo $ass | grep -qe "elm_\w\+(\(const \)\?Elm_\w\+_Item \*"
76 if [ $? == 0 ];then
77 tail -n9 eapi.decl | grep -qe "ELM_\w\+_ITEM_.*CHECK"
78 if [ $? != 0 ];then
79 echo -e "\e[31;1mMISSING CHECKER\e[m\t $i"
80 ret=1
81 fi
82 return
57 fi 83 fi
58 84
59 rm eapi.decl 85 rm eapi.decl
@@ -62,13 +88,7 @@ check(){
62grep -e "^ *EAPI.*(.*)" src/lib/Elementary.h.in | grep -oe 'elm_\w\+' >eapi.list 88grep -e "^ *EAPI.*(.*)" src/lib/Elementary.h.in | grep -oe 'elm_\w\+' >eapi.list
63 89
64for i in $(cat eapi.list); do 90for i in $(cat eapi.list); do
65 check $i $(ls -1 src/lib/*.c | grep -v elm_widget | grep -v els_cursor) 91 check $i $(ls -1 src/lib/*.c | grep -v elm_widget)
66done
67
68grep -e "^ *EAPI.*(.*)" src/lib/Elementary_Cursor.h | grep -oe 'elm_\w\+' >eapi.list
69
70for i in $(cat eapi.list); do
71 check $i src/lib/els_cursor.c src/lib/elm_main.c
72done 92done
73 93
74grep -e "^ *EAPI.*(.*)" src/lib/elm_widget.h | grep -oe '_\?elm_\w\+' >eapi.list 94grep -e "^ *EAPI.*(.*)" src/lib/elm_widget.h | grep -oe '_\?elm_\w\+' >eapi.list