1 AT_BANNER([data output (data-out)])
3 AT_SETUP([binary and hexadecimal output])
4 AT_DATA([binhex-out.sps], [dnl
8 DATA LIST NOTABLE/x 1-10.
79 FILE HANDLE output/NAME='binhex.out'/MODE=IMAGE/LRECL=256.
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
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
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
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
111 x(pibhex2) x(pibhex4) /* 0ea
112 x(pibhex6) x(pibhex8). /* 0f0
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])
121 AT_SETUP([output valid dates])
122 AT_DATA([date-out.sps], [dnl
124 data list notable /x 1-30 (datetime).
127 30-6-1680 4:50:38.12301
128 24-7-1716 12:31:35.23453
129 19-6-1768 12:47:53.34505
130 2-8-1819 1:26:0.45615
131 27-3-1839 20:58:11.56677
132 19-4-1903 7:36:5.18964
133 25-8-1929 15:43:49.83132
134 29-9-1941 4:25:9.01293
135 19-4-1943 6:49:27.52375
136 7-10-1943 2:57:52.01565
137 17-3-1992 16:45:44.86529
138 25-2-1996 21:30:57.82047
140 19-4-43 6:49:27.10533
141 7-10-43 2:57:52.48229
142 17-3-92 16:45:44.65827
143 25-2-96 21:30:57.58219
144 10-11-2038 22:30:4.18347
145 18-7-2094 1:56:51.59319
147 print outfile='date-out.out'/x(date9) ' | ' x(date11).
148 print outfile='date-out.out'/x(adate8) ' | ' x(adate10).
149 print outfile='date-out.out'/x(edate8) ' | ' x(edate10).
150 print outfile='date-out.out'/x(jdate5) ' | ' x(jdate7).
151 print outfile='date-out.out'/x(sdate8) ' | ' x(sdate10).
152 print outfile='date-out.out'/x(qyr6) ' | ' x(qyr8).
153 print outfile='date-out.out'/x(moyr6) ' | ' x(moyr8).
154 print outfile='date-out.out'/x(wkyr8) ' | ' x(wkyr10).
155 print outfile='date-out.out'/x(datetime17).
156 print outfile='date-out.out'/x(datetime18).
157 print outfile='date-out.out'/x(datetime19).
158 print outfile='date-out.out'/x(datetime20).
159 print outfile='date-out.out'/x(datetime21).
160 print outfile='date-out.out'/x(datetime22).
161 print outfile='date-out.out'/x(datetime22.1).
162 print outfile='date-out.out'/x(datetime23.2).
163 print outfile='date-out.out'/x(datetime24.3).
164 print outfile='date-out.out'/x(datetime25.4).
165 print outfile='date-out.out'/x(datetime26.5).
168 AT_CHECK([pspp -O format=csv date-out.sps])
169 AT_CHECK([cat date-out.out], [0], [dnl
170 ********* | 10-JUN-1648
171 ******** | 06/10/1648
172 ******** | 10.06.1648
174 ******** | 1648/06/10
177 ******** | 24 WK 1648
184 10-JUN-1648 00:00:00.0
185 10-JUN-1648 00:00:00.00
186 10-JUN-1648 00:00:00.000
187 10-JUN-1648 00:00:00.0000
188 10-JUN-1648 00:00:00.00000
189 ********* | 30-JUN-1680
190 ******** | 06/30/1680
191 ******** | 30.06.1680
193 ******** | 1680/06/30
196 ******** | 26 WK 1680
203 30-JUN-1680 04:50:38.1
204 30-JUN-1680 04:50:38.12
205 30-JUN-1680 04:50:38.123
206 30-JUN-1680 04:50:38.1230
207 30-JUN-1680 04:50:38.12301
208 ********* | 24-JUL-1716
209 ******** | 07/24/1716
210 ******** | 24.07.1716
212 ******** | 1716/07/24
215 ******** | 30 WK 1716
222 24-JUL-1716 12:31:35.2
223 24-JUL-1716 12:31:35.23
224 24-JUL-1716 12:31:35.235
225 24-JUL-1716 12:31:35.2345
226 24-JUL-1716 12:31:35.23453
227 ********* | 19-JUN-1768
228 ******** | 06/19/1768
229 ******** | 19.06.1768
231 ******** | 1768/06/19
234 ******** | 25 WK 1768
241 19-JUN-1768 12:47:53.3
242 19-JUN-1768 12:47:53.35
243 19-JUN-1768 12:47:53.345
244 19-JUN-1768 12:47:53.3450
245 19-JUN-1768 12:47:53.34505
246 ********* | 02-AUG-1819
247 ******** | 08/02/1819
248 ******** | 02.08.1819
250 ******** | 1819/08/02
253 ******** | 31 WK 1819
260 02-AUG-1819 01:26:00.5
261 02-AUG-1819 01:26:00.46
262 02-AUG-1819 01:26:00.456
263 02-AUG-1819 01:26:00.4562
264 02-AUG-1819 01:26:00.45615
265 ********* | 27-MAR-1839
266 ******** | 03/27/1839
267 ******** | 27.03.1839
269 ******** | 1839/03/27
272 ******** | 13 WK 1839
279 27-MAR-1839 20:58:11.6
280 27-MAR-1839 20:58:11.57
281 27-MAR-1839 20:58:11.567
282 27-MAR-1839 20:58:11.5668
283 27-MAR-1839 20:58:11.56677
284 ********* | 19-APR-1903
285 ******** | 04/19/1903
286 ******** | 19.04.1903
288 ******** | 1903/04/19
291 ******** | 16 WK 1903
298 19-APR-1903 07:36:05.2
299 19-APR-1903 07:36:05.19
300 19-APR-1903 07:36:05.190
301 19-APR-1903 07:36:05.1896
302 19-APR-1903 07:36:05.18964
303 ********* | 25-AUG-1929
304 ******** | 08/25/1929
305 ******** | 25.08.1929
307 ******** | 1929/08/25
310 ******** | 34 WK 1929
317 25-AUG-1929 15:43:49.8
318 25-AUG-1929 15:43:49.83
319 25-AUG-1929 15:43:49.831
320 25-AUG-1929 15:43:49.8313
321 25-AUG-1929 15:43:49.83132
322 29-SEP-41 | 29-SEP-1941
323 09/29/41 | 09/29/1941
324 29.09.41 | 29.09.1941
326 41/09/29 | 1941/09/29
329 39 WK 41 | 39 WK 1941
336 29-SEP-1941 04:25:09.0
337 29-SEP-1941 04:25:09.01
338 29-SEP-1941 04:25:09.013
339 29-SEP-1941 04:25:09.0129
340 29-SEP-1941 04:25:09.01293
341 19-APR-43 | 19-APR-1943
342 04/19/43 | 04/19/1943
343 19.04.43 | 19.04.1943
345 43/04/19 | 1943/04/19
348 16 WK 43 | 16 WK 1943
355 19-APR-1943 06:49:27.5
356 19-APR-1943 06:49:27.52
357 19-APR-1943 06:49:27.524
358 19-APR-1943 06:49:27.5238
359 19-APR-1943 06:49:27.52375
360 07-OCT-43 | 07-OCT-1943
361 10/07/43 | 10/07/1943
362 07.10.43 | 07.10.1943
364 43/10/07 | 1943/10/07
367 40 WK 43 | 40 WK 1943
374 07-OCT-1943 02:57:52.0
375 07-OCT-1943 02:57:52.02
376 07-OCT-1943 02:57:52.016
377 07-OCT-1943 02:57:52.0156
378 07-OCT-1943 02:57:52.01565
379 17-MAR-92 | 17-MAR-1992
380 03/17/92 | 03/17/1992
381 17.03.92 | 17.03.1992
383 92/03/17 | 1992/03/17
386 11 WK 92 | 11 WK 1992
393 17-MAR-1992 16:45:44.9
394 17-MAR-1992 16:45:44.87
395 17-MAR-1992 16:45:44.865
396 17-MAR-1992 16:45:44.8653
397 17-MAR-1992 16:45:44.86529
398 25-FEB-96 | 25-FEB-1996
399 02/25/96 | 02/25/1996
400 25.02.96 | 25.02.1996
402 96/02/25 | 1996/02/25
412 25-FEB-1996 21:30:57.8
413 25-FEB-1996 21:30:57.82
414 25-FEB-1996 21:30:57.820
415 25-FEB-1996 21:30:57.8205
416 25-FEB-1996 21:30:57.82047
417 29-SEP-41 | 29-SEP-1941
418 09/29/41 | 09/29/1941
419 29.09.41 | 29.09.1941
421 41/09/29 | 1941/09/29
424 39 WK 41 | 39 WK 1941
431 29-SEP-1941 04:25:09.2
432 29-SEP-1941 04:25:09.15
433 29-SEP-1941 04:25:09.154
434 29-SEP-1941 04:25:09.1539
435 29-SEP-1941 04:25:09.15395
436 19-APR-43 | 19-APR-1943
437 04/19/43 | 04/19/1943
438 19.04.43 | 19.04.1943
440 43/04/19 | 1943/04/19
443 16 WK 43 | 16 WK 1943
450 19-APR-1943 06:49:27.1
451 19-APR-1943 06:49:27.11
452 19-APR-1943 06:49:27.105
453 19-APR-1943 06:49:27.1053
454 19-APR-1943 06:49:27.10533
455 07-OCT-43 | 07-OCT-1943
456 10/07/43 | 10/07/1943
457 07.10.43 | 07.10.1943
459 43/10/07 | 1943/10/07
462 40 WK 43 | 40 WK 1943
469 07-OCT-1943 02:57:52.5
470 07-OCT-1943 02:57:52.48
471 07-OCT-1943 02:57:52.482
472 07-OCT-1943 02:57:52.4823
473 07-OCT-1943 02:57:52.48229
474 17-MAR-92 | 17-MAR-1992
475 03/17/92 | 03/17/1992
476 17.03.92 | 17.03.1992
478 92/03/17 | 1992/03/17
481 11 WK 92 | 11 WK 1992
488 17-MAR-1992 16:45:44.7
489 17-MAR-1992 16:45:44.66
490 17-MAR-1992 16:45:44.658
491 17-MAR-1992 16:45:44.6583
492 17-MAR-1992 16:45:44.65827
493 25-FEB-96 | 25-FEB-1996
494 02/25/96 | 02/25/1996
495 25.02.96 | 25.02.1996
497 96/02/25 | 1996/02/25
507 25-FEB-1996 21:30:57.6
508 25-FEB-1996 21:30:57.58
509 25-FEB-1996 21:30:57.582
510 25-FEB-1996 21:30:57.5822
511 25-FEB-1996 21:30:57.58219
512 ********* | 10-NOV-2038
513 ******** | 11/10/2038
514 ******** | 10.11.2038
516 ******** | 2038/11/10
519 ******** | 45 WK 2038
526 10-NOV-2038 22:30:04.2
527 10-NOV-2038 22:30:04.18
528 10-NOV-2038 22:30:04.183
529 10-NOV-2038 22:30:04.1835
530 10-NOV-2038 22:30:04.18347
531 ********* | 18-JUL-2094
532 ******** | 07/18/2094
533 ******** | 18.07.2094
535 ******** | 2094/07/18
538 ******** | 29 WK 2094
545 18-JUL-2094 01:56:51.6
546 18-JUL-2094 01:56:51.59
547 18-JUL-2094 01:56:51.593
548 18-JUL-2094 01:56:51.5932
549 18-JUL-2094 01:56:51.59319
553 AT_SETUP([output invalid dates])
554 AT_DATA([bad-date.sps], [dnl
557 data list list notable/x.
563 print outfile='bad-date.out'/x(date9) ' | ' x(date11).
564 print outfile='bad-date.out'/x(adate8) ' | ' x(adate10).
565 print outfile='bad-date.out'/x(edate8) ' | ' x(edate10).
566 print outfile='bad-date.out'/x(jdate5) ' | ' x(jdate7).
567 print outfile='bad-date.out'/x(sdate8) ' | ' x(sdate10).
568 print outfile='bad-date.out'/x(qyr6) ' | ' x(qyr8).
569 print outfile='bad-date.out'/x(moyr6) ' | ' x(moyr8).
570 print outfile='bad-date.out'/x(wkyr8) ' | ' x(wkyr10).
571 print outfile='bad-date.out'/x(datetime17).
572 print outfile='bad-date.out'/x(datetime18).
573 print outfile='bad-date.out'/x(datetime19).
574 print outfile='bad-date.out'/x(datetime20).
575 print outfile='bad-date.out'/x(datetime21).
576 print outfile='bad-date.out'/x(datetime22).
577 print outfile='bad-date.out'/x(datetime22.1).
578 print outfile='bad-date.out'/x(datetime23.2).
579 print outfile='bad-date.out'/x(datetime24.3).
580 print outfile='bad-date.out'/x(datetime25.4).
581 print outfile='bad-date.out'/x(datetime26.5).
584 AT_CHECK([pspp -O format=csv bad-date.sps])
585 AT_CHECK([cat bad-date.out], [0], [dnl
624 ********* | ***********
625 ******** | **********
626 ******** | **********
628 ******** | **********
631 ******** | **********
638 28-MAY-**** 05:20:00.0
639 28-MAY-**** 05:20:00.00
640 28-MAY-**** 05:20:00.000
641 28-MAY-**** 05:20:00.0000
642 28-MAY-**** 05:20:00.00000