data-out: Convert tests for binary and hex formats to Autotest framework.
[pspp-builds.git] / tests / data / data-out.at
1 AT_BANNER([data output (data-out)])
2
3 AT_SETUP([binary and hexadecimal output])
4 AT_DATA([binhex-out.sps], [dnl
5 SET ERRORS=NONE.
6 SET MXWARNS=10000000.
7 SET WIB=MSBFIRST.
8 DATA LIST NOTABLE/x 1-10.
9 BEGIN DATA.
10
11 2
12 11
13 123
14 1234
15 913
16 3.14159
17 777
18 82
19 690
20 -2
21 -11
22 -123
23 -1234
24 -913
25 -3.14159
26 -777
27 -82
28 -690
29 -.1
30 -.5
31 -.9
32 9999.1
33 9999.5
34 9999.9
35 10000
36 18231237
37 -9999.1
38 -9999.5
39 -9999.9
40 -10000
41 -8231237
42 999.1
43 999.5
44 999.9
45 1000
46 8231237
47 -999.1
48 -999.5
49 -999.9
50 -1000
51 -8231237
52 99.1
53 99.5
54 99.9
55 100
56 821237
57 -99.1
58 -99.5
59 -99.9
60 -100
61 -831237
62 9.1
63 9.5
64 9.9
65 10
66 81237
67 -9.1
68 -9.5
69 -9.9
70 -10
71 -81237
72 1.1
73 -1.1
74 1.5
75 -1.5
76 1.9
77 -1.9
78 END DATA.
79 FILE HANDLE output/NAME='binhex.out'/MODE=IMAGE/LRECL=256.
80 WRITE OUTFILE=output/
81         x(p1.0) x(p2.0) x(p3.0) x(p4.0)         /* 000
82         x(p2.1) x(p3.1) x(p4.1)                 /* 00a
83         x(p3.2) x(p4.2)                         /* 013
84         x(p4.3)                                 /* 01a
85         x(pk1.0) x(pk2.0) x(pk3.0) x(pk4.0)     /* 01e
86         x(pk2.1) x(pk3.1) x(pk4.1)              /* 028
87         x(pk3.2) x(pk4.2)                       /* 031
88         x(pk4.3)                                /* 038
89         x(ib1.0) x(ib2.0) x(ib3.0) x(ib4.0)     /* 03c
90         x(ib1.1) x(ib2.1) x(ib3.1) x(ib4.1)     /* 046
91         x(ib1.2) x(ib2.2) x(ib3.2) x(ib4.2)     /* 050
92         x(ib1.3) x(ib2.3) x(ib3.3) x(ib4.3)     /* 05a
93         x(ib2.4) x(ib3.4) x(ib4.4)              /* 064
94         x(ib2.5) x(ib3.5) x(ib4.5)              /* 06d
95         x(ib3.6) x(ib4.6)                       /* 076
96         x(ib3.7) x(ib4.7)                       /* 07d
97         x(ib3.8) x(ib4.8)                       /* 084
98         x(ib4.9)                                /* 08b
99         x(ib4.10)                               /* 08f
100         x(pib1.0) x(pib2.0) x(pib3.0) x(pib4.0) /* 093
101         x(pib1.1) x(pib2.1) x(pib3.1) x(pib4.1) /* 09d
102         x(pib1.2) x(pib2.2) x(pib3.2) x(pib4.2) /* 0a7
103         x(pib1.3) x(pib2.3) x(pib3.3) x(pib4.3) /* 0b1
104         x(pib2.4) x(pib3.4) x(pib4.4)           /* 0bb
105         x(pib2.5) x(pib3.5) x(pib4.5)           /* 0c4
106         x(pib3.6) x(pib4.6)                     /* 0cd
107         x(pib3.7) x(pib4.7)                     /* 0d4
108         x(pib3.8) x(pib4.8)                     /* 0db
109         x(pib4.9)                               /* 0e2
110         x(pib4.10)                              /* 0e6
111         x(pibhex2) x(pibhex4)                   /* 0ea
112         x(pibhex6) x(pibhex8).                  /* 0f0
113                                                 /* 0fe
114 EXECUTE.
115 ])
116 AT_CHECK([pspp -O format=csv binhex-out.sps])
117 AT_CHECK([gzip -cd < $top_srcdir/tests/data/binhex-out.expected.gz > expout])
118 AT_CHECK([cat binhex.out], [0], [expout])
119 AT_CLEANUP