tazpkg view tests/test03 @ rev 884

Module 'check': fix to work with $root; start to add tests
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sat Dec 05 16:14:14 2015 +0200 (2015-12-05)
parents
children
line source
1 #!/bin/sh
2 #
3 . /lib/libtaz.sh
4 check_root
5 ROOT='/tmp/test'
7 title 'Test #03'
8 colorize 033 "$(longline "Don't install already installed package without --forced option.")"
9 newline
11 ########
12 tazpkg --root=$ROOT --nodeps -gi nano 2>&1 | tee /tmp/test1
13 ########
15 if ! fgrep -q -e '--forced' /tmp/test1; then
16 colorize 31 "ERROR. TazPkg should write warning. Exit test"
17 rm /tmp/test1
18 exit 1
19 fi
20 rm /tmp/test1
22 footer "$(colorize 32 'Test #03 passed')"
23 exit 0