5 |
# Licensed under GPL v2, see file LICENSE for details. |
# Licensed under GPL v2, see file LICENSE for details. |
6 |
|
|
7 |
[ -n "$srcdir" ] || srcdir=$(pwd) |
[ -n "$srcdir" ] || srcdir=$(pwd) |
8 |
. testing.sh |
. ./testing.sh |
9 |
|
|
10 |
|
|
11 |
# |
# |
33 |
# verify the applet order is correct in applets.h, otherwise |
# verify the applet order is correct in applets.h, otherwise |
34 |
# applets won't be called properly. |
# applets won't be called properly. |
35 |
# |
# |
36 |
sed -n -e '/^USE_[A-Z]*(APPLET/{s:,.*::;s:.*(::;s:"::g;p}' \ |
sed -n -e 's:^//::' -e '/^IF_[A-Z]*(APPLET/{s:,.*::;s:.*(::;s:"::g;p}' \ |
37 |
$srcdir/../include/applets.h > applet.order.current |
$srcdir/../include/applets.h > applet.order.current |
38 |
LC_ALL=C sort applet.order.current > applet.order.correct |
LC_ALL=C sort applet.order.current > applet.order.correct |
39 |
testing "Applet order" "diff -u applet.order.current applet.order.correct" "" "" "" |
testing "Applet order" "diff -u applet.order.current applet.order.correct" "" "" "" |
73 |
# don't allow obsolete functions |
# don't allow obsolete functions |
74 |
# |
# |
75 |
find $srcdir/.. '(' -name '*.c' -o -name '*.h' ')' -print0 | xargs -0 \ |
find $srcdir/.. '(' -name '*.c' -o -name '*.h' ')' -print0 | xargs -0 \ |
76 |
grep -E -e '\<(bcmp|bcopy|bzero|getwd|index|mktemp|rindex|utimes|sigblock|siggetmask|sigsetmask)\>[[:space:]]*\(' \ |
grep -E -e '\<(bcmp|bcopy|bzero|getwd|index|mktemp|rindex|utime|sigblock|siggetmask|sigsetmask)\>[[:space:]]*\(' \ |
77 |
| sed -e "s:^$srcdir/\.\./::g" > src.obsolete.funcs |
| sed -e "s:^$srcdir/\.\./::g" > src.obsolete.funcs |
78 |
testing "Obsolete function usage" "cat src.obsolete.funcs" "" "" "" |
testing "Obsolete function usage" "cat src.obsolete.funcs" "" "" "" |
79 |
rm -f src.obsolete.funcs |
rm -f src.obsolete.funcs |