File: tests

package info (click to toggle)
pspp 0.3.0-7
  • links: PTS
  • area: main
  • in suites: woody
  • size: 5,288 kB
  • ctags: 4,679
  • sloc: ansic: 57,209; sh: 2,874; makefile: 405; sed: 93; perl: 18
file content (64 lines) | stat: -rw-r--r-- 1,388 bytes parent folder | download | duplicates (2)
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/sh
#
# This is a simple script that tests pspp
#
# install as: /usr/lib/debian-test/tests/pspp
# or else as: /usr/lib/debian-test/tests/pspp/test-1
# In the latter case, /usr/lib/debian-test/tests/pspp/ 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/pspp
# or
#       debian-test -v pspp
# 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/pspp;
fi


## We need a scratch directory in which to execute

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

test1(){
    RESULT=0
# This is one of the examples shipped with pspp
    cat >descript.stat <<EOF
title 'Test DESCRIPTIVES procedure'.

data list / v0 to v16 1-17.
begin data.
12128989012389023
34128080123890128
56127781237893217
78127378123793112
90913781237892318
37978547878935789
52878237892378279
12377912789378932
26787654347894348
29137178947891888
end data.

descript all/stat=all/format=serial.

EOF
    pspp descript.stat
    if grep -q "V4.*-2.51" pspp.list; then true; else RESULT=1; fi
    return $RESULT
}

runtest "descriptive statistics" test1