slitaz-base-files view testsuite.sh @ rev 167

Add colorize() to libtaz.sh
author Christophe Lincoln <pankso@slitaz.org>
date Tue May 15 15:48:14 2012 +0200 (2012-05-15)
parents dd17cc10cd6d
children 614db28a1e8a
line source
1 #!/bin/sh
2 #
3 . rootfs/lib/libtaz.sh
5 check_libtaz() {
6 echo -n "Checking libtaz.sh: status() 0"
7 status
9 echo -n "Checking libtaz.sh: status() 1"
10 touch /tmp/1/2/2/4 2>/dev/null
11 status
13 echo -n "Checking libtaz.sh: boldify() "
14 boldify "Message"
16 echo -n "Checking libtaz.sh: colorize() "
17 echo -n $(colorize "Message " 33)
18 echo -n $(colorize "Message " 35)
19 colorize "Message" 36
21 echo "Checking libtaz.sh: separator"
22 separator
23 }
25 echo -n "Checking libtaz.sh: log()"
26 activity=/tmp/testsuite.log
27 log "Message from SliTaz testsuite"
28 status
29 cat $activity
30 rm -f $activity
32 check_libtaz
33 output="raw"
34 check_libtaz
36 [ "$forced" ] && echo "Checking option: forced=$forced"
37 [ "$root" ] && echo "Checking option: root=$root"
38 [ ! "$1" ] && echo "Check options: $(basename $0) --forced --root=/dev/null"
40 exit 0