openrc/sh/runtests.sh

26 lines
363 B
Bash
Raw Normal View History

2008-03-24 07:17:05 +00:00
#!/bin/sh
2009-04-26 21:13:26 +00:00
: ${top_srcdir:=..}
. $top_srcdir/test/setup_env.sh
2008-03-24 07:17:05 +00:00
ret=0
tret=0
ebegin "Testing yesno()"
for f in yes YES Yes true TRUE True 1 ; do
2009-04-26 21:13:26 +00:00
if ! yesno $f; then
tret=$(($tret + 1))
echo "!$f!"
2008-03-24 07:17:05 +00:00
fi
done
for f in no NO No false FALSE False 0 ; do
2009-04-26 21:13:26 +00:00
if yesno $f; then
tret=$(($tret + 1))
echo "!$f!"
2008-03-24 07:17:05 +00:00
fi
done
2009-04-26 21:13:26 +00:00
eend $tret
ret=$(($ret + $tret))
2008-03-24 07:17:05 +00:00
2009-04-26 21:13:26 +00:00
exit $ret