1 AT_BANNER([data output (data-out)])
3 AT_SETUP([numeric format output])
8 my @values = qw(0 2 9.5 27 271 999.95 2718 9999.995 27182 271828
9 2718281 2**39 2**333 2**-21 -2 -9.5 -27 -271 -999.95 -2718 -9999.995
10 -27182 -271828 -2718281 -2**39 -2**333 -2**-21 -0 3.125 31.25 314.125
11 3141.5 31415.875 314159.25 3141592.625 31415926.5 271828182.25
12 3214567890.5 31415926535.875 -3.125 -31.375 -314.125 -3141.5
13 -31415.875 -314159.25 -3141592.625 -31415926.5 -271828182.25
14 -3214567890.5 -31415926535.875);
16 print "SET CCA=',,,'.\n";
17 print "SET CCB='-,[[[,]]],-'.\n";
18 print "SET CCC='((,[,],))'.\n";
19 print "SET CCD=',XXX,,-'.\n";
20 print "SET CCE=',,YYY,-'.\n";
21 print "INPUT PROGRAM.\n";
22 print "STRING EXPR(A16).\n";
23 print map ("COMPUTE NUM=$_.\nCOMPUTE EXPR='$_'.\nEND CASE.\n", @values);
25 print "END INPUT PROGRAM.\n";
27 print "PRINT OUTFILE='output.txt'/EXPR.\n";
28 for my $format qw (F COMMA DOT DOLLAR PCT E CCA CCB CCC CCD CCE N Z) {
33 $min_w++ if $format eq 'DOLLAR' || $format eq 'PCT';
34 $min_w = 2 if $min_w == 1 && ($format =~ /^CC/);
38 for my $w ($min_w...40) {
39 my ($f) = "$format$w.$d";
40 print "PRINT OUTFILE='output.txt'/'$f: \"' NUM($f) '\"'.\n";
43 print "PRINT SPACE OUTFILE='output.txt'.\n";
47 AT_CHECK([$PERL num-out.pl > num-out.sps])
48 AT_CHECK([pspp -O format=csv num-out.sps])
49 AT_CHECK([inexactify$EXEEXT < output.txt > output.inexact])
50 AT_CHECK([gzip -cd < $top_srcdir/tests/data/num-out.expected.cmp.gz > expout.cmp])
51 AT_DATA([num-out-decmp.pl],
57 if (my ($n) = /^\*(\d+)$/) {
60 $line[3] = " $line[3]";
61 print ' ', join ('', @line), "\n";
63 } elsif (my ($suffix) = /^\$(.*)$/) {
64 for my $c (split ('', $suffix)) {
67 print ' ', join ('', @line), "\n";
69 } elsif (my ($prefix) = /^\^(.*)$/) {
70 for my $c (split ('', $prefix)) {
72 $line[4] = "$c$line[4]";
73 print ' ', join ('', @line), "\n";
76 @line = /^([A-Z]+)(\d+)([^"]+")( *)([^%"]*)(%?")$/;
81 AT_CHECK([$PERL num-out-decmp.pl < expout.cmp > expout.exact])
82 AT_CHECK([[inexactify < expout.exact > expout.inexact]])
83 AT_DATA([num-out-compare.pl],
93 Getopt::Long::Configure ("bundling");
94 GetOptions ("e|exact!" => \$exact,
96 "v|verbose+" => \$verbose,
97 "h|help" => sub { usage (0) })
101 print "$0: compare expected and actual numeric formatting output\n";
102 print "usage: $0 [OPTION...] EXPECTED ACTUAL\n";
103 print "where EXPECTED is the file containing expected output\n";
104 print "and ACTUAL is the file containing actual output.\n";
106 print " -e, --exact: Require numbers to be exactly equal.\n";
107 print " (By default, small differences are permitted.)\n";
108 print " -s, --spss: Ignore most SPSS formatting bugs in EXPECTED.\n";
109 print " (A few differences are not compensated)\n";
110 print " -v, --verbose: Use once to summarize errors and differences.\n";
111 print " Use twice for details of differences.\n";
115 open (EXPECTED, '<', $ARGV[0]) or die "$ARGV[0]: open: $!\n";
116 open (ACTUAL, '<', $ARGV[1]) or die "$ARGV[1]: open: $!\n";
119 my ($approximate) = 0;
124 while (defined (my $a = <EXPECTED>) && defined (my $b = <ACTUAL>)) {
128 if ($a !~ /^\s*$/ && $a !~ /:/) {
134 my ($fmt, $a_out) = $a =~ /^ (.*): "(.*)"$/ or die;
135 my ($b_fmt, $b_out) = $b =~ /^ (.*): "(.*)"$/ or die;
136 die if $fmt ne $b_fmt;
137 die if $a_out eq $b_out;
140 if (increment ($a_out) eq $b_out || increment ($b_out) eq $a_out) {
146 if ($a_out =~ /0.*0/ && $a_out !~ /[1-9]/) {
149 } elsif ($a_out =~ /\*/ && $a_out !~ /^\*+$/) {
152 } elsif ($expr =~ /^-/
154 && $b_out =~ /-\d(\.\d*#*)?E[-+]\d\d\d/
158 } elsif ($expr =~ /^-/
159 && (($a_out !~ /-/ && $a_out =~ /[1-9]/ && $b_out =~ /-/)
160 || ($a_out =~ /^[0-9]+$/ && $b_out =~ /^\*+$/))) {
165 print "$.: $expr in $fmt: expected \"$a_out\", got \"$b_out\"\n"
171 print "Extra lines in $ARGV[0]\n";
176 print "Extra lines in $ARGV[1]\n";
181 print "$errors errors\n";
183 print "$approximate approximate matches\n";
186 print "$bad_round bad rounds\n";
187 print "$spss_wtf1 SPSS WTF 1\n";
188 print "$spss_wtf2 SPSS WTF 2\n";
189 print "$lost_sign lost signs\n";
194 # Returns the argument value incremented by one unit in its final
198 my ($last_digit, $i);
199 for ($i = 0; $i < length $_; $i++) {
200 my ($c) = substr ($_, $i, 1);
202 $last_digit = $i if $c =~ /[0-9]/;
204 return $_ if !defined $last_digit;
205 for ($i = $last_digit; $i >= 0; $i--) {
206 my ($c) = substr ($_, $i, 1);
208 substr ($_, $i, 1) = '0';
209 } elsif ($c =~ /[0-8]/) {
210 substr ($_, $i, 1) = chr (ord ($c) + 1);
214 $_ = "1$_" if $i < 0;
218 AT_CHECK([$PERL num-out-compare.pl $PSPP_NUM_OUT_COMPARE_FLAGS expout.inexact output.inexact])
221 AT_SETUP([binary and hexadecimal output])
222 AT_DATA([binhex-out.sps], [dnl
224 SET MXWARNS=10000000.
226 DATA LIST NOTABLE/x 1-10.
297 FILE HANDLE output/NAME='binhex.out'/MODE=IMAGE/LRECL=256.
298 WRITE OUTFILE=output/
299 x(p1.0) x(p2.0) x(p3.0) x(p4.0) /* 000
300 x(p2.1) x(p3.1) x(p4.1) /* 00a
301 x(p3.2) x(p4.2) /* 013
303 x(pk1.0) x(pk2.0) x(pk3.0) x(pk4.0) /* 01e
304 x(pk2.1) x(pk3.1) x(pk4.1) /* 028
305 x(pk3.2) x(pk4.2) /* 031
307 x(ib1.0) x(ib2.0) x(ib3.0) x(ib4.0) /* 03c
308 x(ib1.1) x(ib2.1) x(ib3.1) x(ib4.1) /* 046
309 x(ib1.2) x(ib2.2) x(ib3.2) x(ib4.2) /* 050
310 x(ib1.3) x(ib2.3) x(ib3.3) x(ib4.3) /* 05a
311 x(ib2.4) x(ib3.4) x(ib4.4) /* 064
312 x(ib2.5) x(ib3.5) x(ib4.5) /* 06d
313 x(ib3.6) x(ib4.6) /* 076
314 x(ib3.7) x(ib4.7) /* 07d
315 x(ib3.8) x(ib4.8) /* 084
318 x(pib1.0) x(pib2.0) x(pib3.0) x(pib4.0) /* 093
319 x(pib1.1) x(pib2.1) x(pib3.1) x(pib4.1) /* 09d
320 x(pib1.2) x(pib2.2) x(pib3.2) x(pib4.2) /* 0a7
321 x(pib1.3) x(pib2.3) x(pib3.3) x(pib4.3) /* 0b1
322 x(pib2.4) x(pib3.4) x(pib4.4) /* 0bb
323 x(pib2.5) x(pib3.5) x(pib4.5) /* 0c4
324 x(pib3.6) x(pib4.6) /* 0cd
325 x(pib3.7) x(pib4.7) /* 0d4
326 x(pib3.8) x(pib4.8) /* 0db
329 x(pibhex2) x(pibhex4) /* 0ea
330 x(pibhex6) x(pibhex8). /* 0f0
334 AT_CHECK([pspp -O format=csv binhex-out.sps])
335 AT_CHECK([gzip -cd < $top_srcdir/tests/data/binhex-out.expected.gz > expout])
336 AT_CHECK([cat binhex.out], [0], [expout])
339 AT_SETUP([output valid dates])
340 AT_DATA([date-out.sps], [dnl
342 data list notable /x 1-30 (datetime).
345 30-6-1680 4:50:38.12301
346 24-7-1716 12:31:35.23453
347 19-6-1768 12:47:53.34505
348 2-8-1819 1:26:0.45615
349 27-3-1839 20:58:11.56677
350 19-4-1903 7:36:5.18964
351 25-8-1929 15:43:49.83132
352 29-9-1941 4:25:9.01293
353 19-4-1943 6:49:27.52375
354 7-10-1943 2:57:52.01565
355 17-3-1992 16:45:44.86529
356 25-2-1996 21:30:57.82047
358 19-4-43 6:49:27.10533
359 7-10-43 2:57:52.48229
360 17-3-92 16:45:44.65827
361 25-2-96 21:30:57.58219
362 10-11-2038 22:30:4.18347
363 18-7-2094 1:56:51.59319
365 print outfile='date-out.out'/x(date9) ' | ' x(date11).
366 print outfile='date-out.out'/x(adate8) ' | ' x(adate10).
367 print outfile='date-out.out'/x(edate8) ' | ' x(edate10).
368 print outfile='date-out.out'/x(jdate5) ' | ' x(jdate7).
369 print outfile='date-out.out'/x(sdate8) ' | ' x(sdate10).
370 print outfile='date-out.out'/x(qyr6) ' | ' x(qyr8).
371 print outfile='date-out.out'/x(moyr6) ' | ' x(moyr8).
372 print outfile='date-out.out'/x(wkyr8) ' | ' x(wkyr10).
373 print outfile='date-out.out'/x(datetime17).
374 print outfile='date-out.out'/x(datetime18).
375 print outfile='date-out.out'/x(datetime19).
376 print outfile='date-out.out'/x(datetime20).
377 print outfile='date-out.out'/x(datetime21).
378 print outfile='date-out.out'/x(datetime22).
379 print outfile='date-out.out'/x(datetime22.1).
380 print outfile='date-out.out'/x(datetime23.2).
381 print outfile='date-out.out'/x(datetime24.3).
382 print outfile='date-out.out'/x(datetime25.4).
383 print outfile='date-out.out'/x(datetime26.5).
386 AT_CHECK([pspp -O format=csv date-out.sps])
387 AT_CHECK([cat date-out.out], [0], [dnl
388 ********* | 10-JUN-1648
389 ******** | 06/10/1648
390 ******** | 10.06.1648
392 ******** | 1648/06/10
395 ******** | 24 WK 1648
402 10-JUN-1648 00:00:00.0
403 10-JUN-1648 00:00:00.00
404 10-JUN-1648 00:00:00.000
405 10-JUN-1648 00:00:00.0000
406 10-JUN-1648 00:00:00.00000
407 ********* | 30-JUN-1680
408 ******** | 06/30/1680
409 ******** | 30.06.1680
411 ******** | 1680/06/30
414 ******** | 26 WK 1680
421 30-JUN-1680 04:50:38.1
422 30-JUN-1680 04:50:38.12
423 30-JUN-1680 04:50:38.123
424 30-JUN-1680 04:50:38.1230
425 30-JUN-1680 04:50:38.12301
426 ********* | 24-JUL-1716
427 ******** | 07/24/1716
428 ******** | 24.07.1716
430 ******** | 1716/07/24
433 ******** | 30 WK 1716
440 24-JUL-1716 12:31:35.2
441 24-JUL-1716 12:31:35.23
442 24-JUL-1716 12:31:35.235
443 24-JUL-1716 12:31:35.2345
444 24-JUL-1716 12:31:35.23453
445 ********* | 19-JUN-1768
446 ******** | 06/19/1768
447 ******** | 19.06.1768
449 ******** | 1768/06/19
452 ******** | 25 WK 1768
459 19-JUN-1768 12:47:53.3
460 19-JUN-1768 12:47:53.35
461 19-JUN-1768 12:47:53.345
462 19-JUN-1768 12:47:53.3450
463 19-JUN-1768 12:47:53.34505
464 ********* | 02-AUG-1819
465 ******** | 08/02/1819
466 ******** | 02.08.1819
468 ******** | 1819/08/02
471 ******** | 31 WK 1819
478 02-AUG-1819 01:26:00.5
479 02-AUG-1819 01:26:00.46
480 02-AUG-1819 01:26:00.456
481 02-AUG-1819 01:26:00.4562
482 02-AUG-1819 01:26:00.45615
483 ********* | 27-MAR-1839
484 ******** | 03/27/1839
485 ******** | 27.03.1839
487 ******** | 1839/03/27
490 ******** | 13 WK 1839
497 27-MAR-1839 20:58:11.6
498 27-MAR-1839 20:58:11.57
499 27-MAR-1839 20:58:11.567
500 27-MAR-1839 20:58:11.5668
501 27-MAR-1839 20:58:11.56677
502 ********* | 19-APR-1903
503 ******** | 04/19/1903
504 ******** | 19.04.1903
506 ******** | 1903/04/19
509 ******** | 16 WK 1903
516 19-APR-1903 07:36:05.2
517 19-APR-1903 07:36:05.19
518 19-APR-1903 07:36:05.190
519 19-APR-1903 07:36:05.1896
520 19-APR-1903 07:36:05.18964
521 ********* | 25-AUG-1929
522 ******** | 08/25/1929
523 ******** | 25.08.1929
525 ******** | 1929/08/25
528 ******** | 34 WK 1929
535 25-AUG-1929 15:43:49.8
536 25-AUG-1929 15:43:49.83
537 25-AUG-1929 15:43:49.831
538 25-AUG-1929 15:43:49.8313
539 25-AUG-1929 15:43:49.83132
540 29-SEP-41 | 29-SEP-1941
541 09/29/41 | 09/29/1941
542 29.09.41 | 29.09.1941
544 41/09/29 | 1941/09/29
547 39 WK 41 | 39 WK 1941
554 29-SEP-1941 04:25:09.0
555 29-SEP-1941 04:25:09.01
556 29-SEP-1941 04:25:09.013
557 29-SEP-1941 04:25:09.0129
558 29-SEP-1941 04:25:09.01293
559 19-APR-43 | 19-APR-1943
560 04/19/43 | 04/19/1943
561 19.04.43 | 19.04.1943
563 43/04/19 | 1943/04/19
566 16 WK 43 | 16 WK 1943
573 19-APR-1943 06:49:27.5
574 19-APR-1943 06:49:27.52
575 19-APR-1943 06:49:27.524
576 19-APR-1943 06:49:27.5238
577 19-APR-1943 06:49:27.52375
578 07-OCT-43 | 07-OCT-1943
579 10/07/43 | 10/07/1943
580 07.10.43 | 07.10.1943
582 43/10/07 | 1943/10/07
585 40 WK 43 | 40 WK 1943
592 07-OCT-1943 02:57:52.0
593 07-OCT-1943 02:57:52.02
594 07-OCT-1943 02:57:52.016
595 07-OCT-1943 02:57:52.0156
596 07-OCT-1943 02:57:52.01565
597 17-MAR-92 | 17-MAR-1992
598 03/17/92 | 03/17/1992
599 17.03.92 | 17.03.1992
601 92/03/17 | 1992/03/17
604 11 WK 92 | 11 WK 1992
611 17-MAR-1992 16:45:44.9
612 17-MAR-1992 16:45:44.87
613 17-MAR-1992 16:45:44.865
614 17-MAR-1992 16:45:44.8653
615 17-MAR-1992 16:45:44.86529
616 25-FEB-96 | 25-FEB-1996
617 02/25/96 | 02/25/1996
618 25.02.96 | 25.02.1996
620 96/02/25 | 1996/02/25
630 25-FEB-1996 21:30:57.8
631 25-FEB-1996 21:30:57.82
632 25-FEB-1996 21:30:57.820
633 25-FEB-1996 21:30:57.8205
634 25-FEB-1996 21:30:57.82047
635 29-SEP-41 | 29-SEP-1941
636 09/29/41 | 09/29/1941
637 29.09.41 | 29.09.1941
639 41/09/29 | 1941/09/29
642 39 WK 41 | 39 WK 1941
649 29-SEP-1941 04:25:09.2
650 29-SEP-1941 04:25:09.15
651 29-SEP-1941 04:25:09.154
652 29-SEP-1941 04:25:09.1539
653 29-SEP-1941 04:25:09.15395
654 19-APR-43 | 19-APR-1943
655 04/19/43 | 04/19/1943
656 19.04.43 | 19.04.1943
658 43/04/19 | 1943/04/19
661 16 WK 43 | 16 WK 1943
668 19-APR-1943 06:49:27.1
669 19-APR-1943 06:49:27.11
670 19-APR-1943 06:49:27.105
671 19-APR-1943 06:49:27.1053
672 19-APR-1943 06:49:27.10533
673 07-OCT-43 | 07-OCT-1943
674 10/07/43 | 10/07/1943
675 07.10.43 | 07.10.1943
677 43/10/07 | 1943/10/07
680 40 WK 43 | 40 WK 1943
687 07-OCT-1943 02:57:52.5
688 07-OCT-1943 02:57:52.48
689 07-OCT-1943 02:57:52.482
690 07-OCT-1943 02:57:52.4823
691 07-OCT-1943 02:57:52.48229
692 17-MAR-92 | 17-MAR-1992
693 03/17/92 | 03/17/1992
694 17.03.92 | 17.03.1992
696 92/03/17 | 1992/03/17
699 11 WK 92 | 11 WK 1992
706 17-MAR-1992 16:45:44.7
707 17-MAR-1992 16:45:44.66
708 17-MAR-1992 16:45:44.658
709 17-MAR-1992 16:45:44.6583
710 17-MAR-1992 16:45:44.65827
711 25-FEB-96 | 25-FEB-1996
712 02/25/96 | 02/25/1996
713 25.02.96 | 25.02.1996
715 96/02/25 | 1996/02/25
725 25-FEB-1996 21:30:57.6
726 25-FEB-1996 21:30:57.58
727 25-FEB-1996 21:30:57.582
728 25-FEB-1996 21:30:57.5822
729 25-FEB-1996 21:30:57.58219
730 ********* | 10-NOV-2038
731 ******** | 11/10/2038
732 ******** | 10.11.2038
734 ******** | 2038/11/10
737 ******** | 45 WK 2038
744 10-NOV-2038 22:30:04.2
745 10-NOV-2038 22:30:04.18
746 10-NOV-2038 22:30:04.183
747 10-NOV-2038 22:30:04.1835
748 10-NOV-2038 22:30:04.18347
749 ********* | 18-JUL-2094
750 ******** | 07/18/2094
751 ******** | 18.07.2094
753 ******** | 2094/07/18
756 ******** | 29 WK 2094
763 18-JUL-2094 01:56:51.6
764 18-JUL-2094 01:56:51.59
765 18-JUL-2094 01:56:51.593
766 18-JUL-2094 01:56:51.5932
767 18-JUL-2094 01:56:51.59319
771 AT_SETUP([output invalid dates])
772 AT_DATA([bad-date.sps], [dnl
775 data list list notable/x.
781 print outfile='bad-date.out'/x(date9) ' | ' x(date11).
782 print outfile='bad-date.out'/x(adate8) ' | ' x(adate10).
783 print outfile='bad-date.out'/x(edate8) ' | ' x(edate10).
784 print outfile='bad-date.out'/x(jdate5) ' | ' x(jdate7).
785 print outfile='bad-date.out'/x(sdate8) ' | ' x(sdate10).
786 print outfile='bad-date.out'/x(qyr6) ' | ' x(qyr8).
787 print outfile='bad-date.out'/x(moyr6) ' | ' x(moyr8).
788 print outfile='bad-date.out'/x(wkyr8) ' | ' x(wkyr10).
789 print outfile='bad-date.out'/x(datetime17).
790 print outfile='bad-date.out'/x(datetime18).
791 print outfile='bad-date.out'/x(datetime19).
792 print outfile='bad-date.out'/x(datetime20).
793 print outfile='bad-date.out'/x(datetime21).
794 print outfile='bad-date.out'/x(datetime22).
795 print outfile='bad-date.out'/x(datetime22.1).
796 print outfile='bad-date.out'/x(datetime23.2).
797 print outfile='bad-date.out'/x(datetime24.3).
798 print outfile='bad-date.out'/x(datetime25.4).
799 print outfile='bad-date.out'/x(datetime26.5).
802 AT_CHECK([pspp -O format=csv bad-date.sps])
803 AT_CHECK([cat bad-date.out], [0], [dnl
842 ********* | ***********
843 ******** | **********
844 ******** | **********
846 ******** | **********
849 ******** | **********
856 28-MAY-**** 05:20:00.0
857 28-MAY-**** 05:20:00.00
858 28-MAY-**** 05:20:00.000
859 28-MAY-**** 05:20:00.0000
860 28-MAY-**** 05:20:00.00000
864 AT_SETUP([time output])
865 AT_DATA([time-out.sps], [dnl
867 data list notable /x 1-30 (dtime).
1070 print outfile='time-out.out'/x(time5).
1071 print outfile='time-out.out'/x(time6).
1072 print outfile='time-out.out'/x(time7).
1073 print outfile='time-out.out'/x(time8).
1074 print outfile='time-out.out'/x(time9).
1075 print outfile='time-out.out'/x(time10).
1076 print outfile='time-out.out'/x(time10.1).
1077 print outfile='time-out.out'/x(time11).
1078 print outfile='time-out.out'/x(time11.1).
1079 print outfile='time-out.out'/x(time11.2).
1080 print outfile='time-out.out'/x(time12).
1081 print outfile='time-out.out'/x(time12.1).
1082 print outfile='time-out.out'/x(time12.2).
1083 print outfile='time-out.out'/x(time12.3).
1084 print outfile='time-out.out'/x(time13).
1085 print outfile='time-out.out'/x(time13.1).
1086 print outfile='time-out.out'/x(time13.2).
1087 print outfile='time-out.out'/x(time13.3).
1088 print outfile='time-out.out'/x(time13.4).
1089 print outfile='time-out.out'/x(time14).
1090 print outfile='time-out.out'/x(time14.1).
1091 print outfile='time-out.out'/x(time14.2).
1092 print outfile='time-out.out'/x(time14.3).
1093 print outfile='time-out.out'/x(time14.4).
1094 print outfile='time-out.out'/x(time14.5).
1095 print outfile='time-out.out'/x(time15).
1096 print outfile='time-out.out'/x(time15.1).
1097 print outfile='time-out.out'/x(time15.2).
1098 print outfile='time-out.out'/x(time15.3).
1099 print outfile='time-out.out'/x(time15.4).
1100 print outfile='time-out.out'/x(time15.5).
1101 print outfile='time-out.out'/x(time15.6).
1102 print outfile='time-out.out'/x(dtime8).
1103 print outfile='time-out.out'/x(dtime9).
1104 print outfile='time-out.out'/x(dtime10).
1105 print outfile='time-out.out'/x(dtime11).
1106 print outfile='time-out.out'/x(dtime12).
1107 print outfile='time-out.out'/x(dtime13).
1108 print outfile='time-out.out'/x(dtime13.1).
1109 print outfile='time-out.out'/x(dtime14).
1110 print outfile='time-out.out'/x(dtime14.1).
1111 print outfile='time-out.out'/x(dtime14.2).
1112 print outfile='time-out.out'/x(dtime15).
1113 print outfile='time-out.out'/x(dtime15.1).
1114 print outfile='time-out.out'/x(dtime15.2).
1115 print outfile='time-out.out'/x(dtime15.3).
1116 print outfile='time-out.out'/x(dtime16).
1117 print outfile='time-out.out'/x(dtime16.1).
1118 print outfile='time-out.out'/x(dtime16.2).
1119 print outfile='time-out.out'/x(dtime16.3).
1120 print outfile='time-out.out'/x(dtime16.4).
1121 print outfile='time-out.out'/x(dtime17).
1122 print outfile='time-out.out'/x(dtime17.1).
1123 print outfile='time-out.out'/x(dtime17.2).
1124 print outfile='time-out.out'/x(dtime17.3).
1125 print outfile='time-out.out'/x(dtime17.4).
1126 print outfile='time-out.out'/x(dtime17.5).
1127 print outfile='time-out.out'/x(dtime18).
1128 print outfile='time-out.out'/x(dtime18.1).
1129 print outfile='time-out.out'/x(dtime18.2).
1130 print outfile='time-out.out'/x(dtime18.3).
1131 print outfile='time-out.out'/x(dtime18.4).
1132 print outfile='time-out.out'/x(dtime18.5).
1133 print outfile='time-out.out'/x(dtime18.6).
1136 AT_CHECK([pspp -O format=csv time-out.sps])
1137 AT_CHECK([cat time-out.out], [0], [dnl
13941 AT_SETUP([MONTH output])
13942 AT_DATA([month-out.sps], [dnl
13944 set mxwarns=10000000.
13945 data list notable/x 1-10.
13971 print outfile='month-out.out'/x(month3).
13972 print outfile='month-out.out'/x(month4).
13973 print outfile='month-out.out'/x(month5).
13974 print outfile='month-out.out'/x(month6).
13975 print outfile='month-out.out'/x(month7).
13976 print outfile='month-out.out'/x(month8).
13977 print outfile='month-out.out'/x(month9).
13978 print outfile='month-out.out'/x(month10).
13979 print outfile='month-out.out'/x(month11).
13980 print outfile='month-out.out'/x(month12).
13981 print outfile='month-out.out'/x(month13).
13982 print outfile='month-out.out'/x(month14).
13983 print outfile='month-out.out'/x(month15).
13984 print outfile='month-out.out'/x(month16).
13985 print outfile='month-out.out'/x(month17).
13986 print outfile='month-out.out'/x(month18).
13987 print outfile='month-out.out'/x(month19).
13988 print outfile='month-out.out'/x(month20).
13989 print outfile='month-out.out'/x(month21).
13990 print outfile='month-out.out'/x(month22).
13991 print outfile='month-out.out'/x(month23).
13992 print outfile='month-out.out'/x(month24).
13993 print outfile='month-out.out'/x(month25).
13994 print outfile='month-out.out'/x(month26).
13995 print outfile='month-out.out'/x(month27).
13996 print outfile='month-out.out'/x(month28).
13997 print outfile='month-out.out'/x(month29).
13998 print outfile='month-out.out'/x(month30).
13999 print outfile='month-out.out'/x(month31).
14000 print outfile='month-out.out'/x(month32).
14001 print outfile='month-out.out'/x(month33).
14002 print outfile='month-out.out'/x(month34).
14003 print outfile='month-out.out'/x(month35).
14004 print outfile='month-out.out'/x(month36).
14005 print outfile='month-out.out'/x(month37).
14006 print outfile='month-out.out'/x(month38).
14007 print outfile='month-out.out'/x(month39).
14008 print outfile='month-out.out'/x(month40).
14011 AT_CHECK([pspp -O format=csv month-out.sps], [1], [stdout])
14012 AT_CHECK([[sed '/^$/d' stdout | sort | uniq -c | sed 's/^[ ]*//']], [0],
14014 38 error: Month number 0.000000 is not between 1 and 12.
14015 38 error: Month number 0.500000 is not between 1 and 12.
14016 38 error: Month number 0.900000 is not between 1 and 12.
14017 38 error: Month number 13.000000 is not between 1 and 12.
14019 AT_CHECK([cat month-out.out], [0], [dnl
14897 AT_SETUP([WKDAY output])
14898 AT_DATA([wkday-out.sps], [dnl
14899 set mxwarns=10000000.
14900 set mxerrs=10000000.
14901 data list notable/x 1-10.
14922 do repeat format=wkday2 to wkday40.
14923 print outfile='wkday-out.out'/x(format).
14927 AT_CHECK([pspp -O format=csv wkday-out.sps], [1], [stdout])
14928 AT_CHECK([[sed '/^$/d' stdout | sort | uniq -c | sed 's/^[ ]*//']], [0],
14930 39 error: Weekday number 0.000000 is not between 1 and 7.
14931 39 error: Weekday number 0.500000 is not between 1 and 7.
14932 39 error: Weekday number 0.900000 is not between 1 and 7.
14933 39 error: Weekday number 8.000000 is not between 1 and 7.
14935 AT_CHECK([cat wkday-out.out], [0], [dnl