diff options
author | Tiago Rezende Campos Falcao <developer@tiagofalcao.com> | 2010-11-02 11:26:44 +0000 |
---|---|---|
committer | Tiago Rezende Campos Falcao <developer@tiagofalcao.com> | 2010-11-02 11:26:44 +0000 |
commit | cd61ca17e74c98be9bb82c07f4ffd0e4597cc053 (patch) | |
tree | 25b0f721abf44e1492e0a80bedf8ccadde20f82e /tests | |
parent | 51fb1fbae941ec66791f8d9eca7e95e951e87d6d (diff) | |
download | elementary-cd61ca17e74c98be9bb82c07f4ffd0e4597cc053.tar.gz |
Add test and checker to widget items
SVN revision: 54089
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/test_decl.sh | 58 |
1 files changed, 39 insertions, 19 deletions
diff --git a/tests/test_decl.sh b/tests/test_decl.sh index c317f50d6..ca86eba1d 100755 --- a/tests/test_decl.sh +++ b/tests/test_decl.sh @@ -24,36 +24,62 @@ check(){ fi func=$(echo $i | grep -oe 'elm_\w\+') + ass=$(sed '2q;d' eapi.decl) - sed '2q;d' eapi.decl | grep -qe "elm_widget\w\+(\(const \)\?Evas_Object \*" + echo $i | grep -qe "^elm_object" if [ $? == 0 ];then - tail -n9 eapi.decl | grep -q "\(API_ENTRY\|_elm_widget_is\)" - if [ $? != 0 ];then - echo -e "\e[31;1mMISSING CHECKER\e[m\t $i" - ret=1 - fi + rm eapi.decl return fi - sed '2q;d' eapi.decl | grep -qe "elm_object_\w\+(" + echo $i | grep -qe "^elm_widget" if [ $? == 0 ];then - rm eapi.decl - return + + echo $ass | grep -qe "elm_widget\w\+(\(const \)\?Evas_Object \*" + if [ $? == 0 ];then + tail -n9 eapi.decl | grep -q "\(API_ENTRY\|_elm_widget_is\)" + if [ $? != 0 ];then + echo -e "\e[31;1mMISSING CHECKER\e[m\t $i" + ret=1 + fi + return + fi + + echo $ass | grep -qe "elm_widget\w\+(\(const \)\?Elm_ \*" + if [ $? == 0 ];then + tail -n9 eapi.decl | grep -qe "ELM_WIDGET_ITEM_CHECK" + if [ $? != 0 ];then + echo -e "\e[31;1mMISSING CHECKER\e[m\t $i" + ret=1 + fi + return + fi fi - sed '2q;d' eapi.decl | grep -qe "elm_\w\+_add(" + echo $ass | grep -qe "elm_\w\+_add" if [ $? == 0 ];then - rm eapi.decl + echo -e "\e[32;1m???\e[m\t $i" return fi - sed '2q;d' eapi.decl | grep -qe "elm_\w\+(\(const \)\?Evas_Object \*" + echo $ass | grep -qe "elm_\w\+(\(const \)\?Evas_Object \*" if [ $? == 0 ];then tail -n9 eapi.decl | grep -q "ELM_CHECK_WIDTYPE" if [ $? != 0 ];then echo -e "\e[31;1mMISSING CHECKER\e[m\t $i" ret=1 fi + return + fi + + echo $ass | grep -qe "elm_\w\+(\(const \)\?Elm_\w\+_Item \*" + if [ $? == 0 ];then + tail -n9 eapi.decl | grep -qe "ELM_\w\+_ITEM_.*CHECK" + if [ $? != 0 ];then + echo -e "\e[31;1mMISSING CHECKER\e[m\t $i" + ret=1 + fi + return fi rm eapi.decl @@ -62,13 +88,7 @@ check(){ grep -e "^ *EAPI.*(.*)" src/lib/Elementary.h.in | grep -oe 'elm_\w\+' >eapi.list for i in $(cat eapi.list); do - check $i $(ls -1 src/lib/*.c | grep -v elm_widget | grep -v els_cursor) -done - -grep -e "^ *EAPI.*(.*)" src/lib/Elementary_Cursor.h | grep -oe 'elm_\w\+' >eapi.list - -for i in $(cat eapi.list); do - check $i src/lib/els_cursor.c src/lib/elm_main.c + check $i $(ls -1 src/lib/*.c | grep -v elm_widget) done grep -e "^ *EAPI.*(.*)" src/lib/elm_widget.h | grep -oe '_\?elm_\w\+' >eapi.list |