openrc/sh/runtests.sh

26 lines
361 B
Bash
Raw Normal View History

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