File: tests

package info (click to toggle)
multimix 19981218-7
  • links: PTS
  • area: main
  • in suites: sarge, woody
  • size: 1,656 kB
  • ctags: 235
  • sloc: sh: 123; makefile: 60; ansic: 30
file content (49 lines) | stat: -rw-r--r-- 1,115 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/sh
#
# This is a simple script that tests multimix
#
# install as: /usr/lib/debian-test/tests/multimix
# or else as: /usr/lib/debian-test/tests/multimix/test-1
# In the latter case, /usr/lib/debian-test/tests/multimix/ can contain
# other file with test data and/or other scripts named test-2, test-3, etc.
#
# You can run this script with the command
#       sh debian/tests
# After installation, you can run it with the commands
#       /usr/lib/debian-test/tests/multimix
# or
#       debian-test -v multimix
# see debian-test(1)

. ${DEBIANTEST_LIB:-/usr/lib/debian-test/lib}/functions.sh

if [ -f my-data-file ]; then
    TESTDIR=`pwd`;
else
    TESTDIR=/usr/lib/debian-test/tests/multimix;
fi


## we need a scratch directory in which to execute

TMP=/tmp/multimix-test.$$
test -e $TMP && rm -rf $TMP
mkdir $TMP
cd $TMP
trap "rm -rf $TMP" EXIT

test1(){
    RESULT=0
    cp /usr/share/doc/multimix/examples/* .
    sh simple.README
    if grep -q "XING PROPORTION IN GROUP   2 IS 0.66819" GENERAL.OUT; then 
	true; 
    else 
	RESULT=1; 
    fi

    return $RESULT
}

runtest "simple test case" test1