SAMPLE: Convert test to Autotest framework.
[pspp-builds.git] / tests / language / xforms / sample.at
1 AT_BANNER([SAMPLE])
2
3 AT_SETUP([SAMPLE])
4 AT_DATA([sample.sps], [dnl
5 set seed=3
6
7 data list notable /A 1-2.
8 begin data.
9 1
10 2
11 3
12 4
13 5
14 6
15 7
16 8
17 9
18 10
19 end data.
20 sample .5.
21 list.
22 ])
23 AT_CHECK([pspp -o pspp.csv sample.sps])
24 AT_CAPTURE_FILE([pspp.csv])
25 AT_CHECK(
26   [n=0
27    while read line; do
28      n=`expr $n + 1`
29      case $line in # (
30        "Table: Data List" | A | [[0-9]] | 10) ;; # (
31        *) echo $line; exit 1;
32      esac
33    done < pspp.csv
34    if test $n -ge 11; then exit 1; fi
35   ])
36 AT_CLEANUP