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([non-ASCII custom currency formats])
222 AT_DATA([data-out.sps], [dnl
223 SET CCA='«,¥,€,»'.
225 DATA LIST LIST NOTABLE/x.
226 PRINT/x (F8.2) x (CCA10.2).
238 AT_CHECK([pspp -O format=csv data-out.sps], [0], [dnl
239 "data-out.sps:2: note: SHOW: CCA is «,¥,€,»."
251 1.5E+010 ¥2E+010€ @&t@
253 -2E+010«¥2E+010€»
257 AT_SETUP([binary and hexadecimal output])
258 AT_DATA([binhex-out.sps], [dnl
260 SET MXWARNS=10000000.
262 DATA LIST NOTABLE/x 1-10.
333 FILE HANDLE output/NAME='binhex.out'/MODE=IMAGE/LRECL=256.
334 WRITE OUTFILE=output/
335 x(p1.0) x(p2.0) x(p3.0) x(p4.0) /* 000
336 x(p2.1) x(p3.1) x(p4.1) /* 00a
337 x(p3.2) x(p4.2) /* 013
339 x(pk1.0) x(pk2.0) x(pk3.0) x(pk4.0) /* 01e
340 x(pk2.1) x(pk3.1) x(pk4.1) /* 028
341 x(pk3.2) x(pk4.2) /* 031
343 x(ib1.0) x(ib2.0) x(ib3.0) x(ib4.0) /* 03c
344 x(ib1.1) x(ib2.1) x(ib3.1) x(ib4.1) /* 046
345 x(ib1.2) x(ib2.2) x(ib3.2) x(ib4.2) /* 050
346 x(ib1.3) x(ib2.3) x(ib3.3) x(ib4.3) /* 05a
347 x(ib2.4) x(ib3.4) x(ib4.4) /* 064
348 x(ib2.5) x(ib3.5) x(ib4.5) /* 06d
349 x(ib3.6) x(ib4.6) /* 076
350 x(ib3.7) x(ib4.7) /* 07d
351 x(ib3.8) x(ib4.8) /* 084
354 x(pib1.0) x(pib2.0) x(pib3.0) x(pib4.0) /* 093
355 x(pib1.1) x(pib2.1) x(pib3.1) x(pib4.1) /* 09d
356 x(pib1.2) x(pib2.2) x(pib3.2) x(pib4.2) /* 0a7
357 x(pib1.3) x(pib2.3) x(pib3.3) x(pib4.3) /* 0b1
358 x(pib2.4) x(pib3.4) x(pib4.4) /* 0bb
359 x(pib2.5) x(pib3.5) x(pib4.5) /* 0c4
360 x(pib3.6) x(pib4.6) /* 0cd
361 x(pib3.7) x(pib4.7) /* 0d4
362 x(pib3.8) x(pib4.8) /* 0db
365 x(pibhex2) x(pibhex4) /* 0ea
366 x(pibhex6) x(pibhex8). /* 0f0
370 AT_CHECK([pspp -O format=csv binhex-out.sps])
371 AT_CHECK([gzip -cd < $top_srcdir/tests/data/binhex-out.expected.gz > expout])
372 AT_CHECK([cat binhex.out], [0], [expout])
375 AT_SETUP([output valid dates])
376 AT_DATA([date-out.sps], [dnl
378 data list notable /x 1-30 (datetime).
381 30-6-1680 4:50:38.12301
382 24-7-1716 12:31:35.23453
383 19-6-1768 12:47:53.34505
384 2-8-1819 1:26:0.45615
385 27-3-1839 20:58:11.56677
386 19-4-1903 7:36:5.18964
387 25-8-1929 15:43:49.83132
388 29-9-1941 4:25:9.01293
389 19-4-1943 6:49:27.52375
390 7-10-1943 2:57:52.01565
391 17-3-1992 16:45:44.86529
392 25-2-1996 21:30:57.82047
394 19-4-43 6:49:27.10533
395 7-10-43 2:57:52.48229
396 17-3-92 16:45:44.65827
397 25-2-96 21:30:57.58219
398 10-11-2038 22:30:4.18347
399 18-7-2094 1:56:51.59319
401 print outfile='date-out.out'/x(date9) ' | ' x(date11).
402 print outfile='date-out.out'/x(adate8) ' | ' x(adate10).
403 print outfile='date-out.out'/x(edate8) ' | ' x(edate10).
404 print outfile='date-out.out'/x(jdate5) ' | ' x(jdate7).
405 print outfile='date-out.out'/x(sdate8) ' | ' x(sdate10).
406 print outfile='date-out.out'/x(qyr6) ' | ' x(qyr8).
407 print outfile='date-out.out'/x(moyr6) ' | ' x(moyr8).
408 print outfile='date-out.out'/x(wkyr8) ' | ' x(wkyr10).
409 print outfile='date-out.out'/x(datetime17).
410 print outfile='date-out.out'/x(datetime18).
411 print outfile='date-out.out'/x(datetime19).
412 print outfile='date-out.out'/x(datetime20).
413 print outfile='date-out.out'/x(datetime21).
414 print outfile='date-out.out'/x(datetime22).
415 print outfile='date-out.out'/x(datetime22.1).
416 print outfile='date-out.out'/x(datetime23.2).
417 print outfile='date-out.out'/x(datetime24.3).
418 print outfile='date-out.out'/x(datetime25.4).
419 print outfile='date-out.out'/x(datetime26.5).
422 AT_CHECK([pspp -O format=csv date-out.sps])
423 AT_CHECK([cat date-out.out], [0], [dnl
424 ********* | 10-JUN-1648
425 ******** | 06/10/1648
426 ******** | 10.06.1648
428 ******** | 1648/06/10
431 ******** | 24 WK 1648
438 10-JUN-1648 00:00:00.0
439 10-JUN-1648 00:00:00.00
440 10-JUN-1648 00:00:00.000
441 10-JUN-1648 00:00:00.0000
442 10-JUN-1648 00:00:00.00000
443 ********* | 30-JUN-1680
444 ******** | 06/30/1680
445 ******** | 30.06.1680
447 ******** | 1680/06/30
450 ******** | 26 WK 1680
457 30-JUN-1680 04:50:38.1
458 30-JUN-1680 04:50:38.12
459 30-JUN-1680 04:50:38.123
460 30-JUN-1680 04:50:38.1230
461 30-JUN-1680 04:50:38.12301
462 ********* | 24-JUL-1716
463 ******** | 07/24/1716
464 ******** | 24.07.1716
466 ******** | 1716/07/24
469 ******** | 30 WK 1716
476 24-JUL-1716 12:31:35.2
477 24-JUL-1716 12:31:35.23
478 24-JUL-1716 12:31:35.235
479 24-JUL-1716 12:31:35.2345
480 24-JUL-1716 12:31:35.23453
481 ********* | 19-JUN-1768
482 ******** | 06/19/1768
483 ******** | 19.06.1768
485 ******** | 1768/06/19
488 ******** | 25 WK 1768
495 19-JUN-1768 12:47:53.3
496 19-JUN-1768 12:47:53.35
497 19-JUN-1768 12:47:53.345
498 19-JUN-1768 12:47:53.3450
499 19-JUN-1768 12:47:53.34505
500 ********* | 02-AUG-1819
501 ******** | 08/02/1819
502 ******** | 02.08.1819
504 ******** | 1819/08/02
507 ******** | 31 WK 1819
514 02-AUG-1819 01:26:00.5
515 02-AUG-1819 01:26:00.46
516 02-AUG-1819 01:26:00.456
517 02-AUG-1819 01:26:00.4562
518 02-AUG-1819 01:26:00.45615
519 ********* | 27-MAR-1839
520 ******** | 03/27/1839
521 ******** | 27.03.1839
523 ******** | 1839/03/27
526 ******** | 13 WK 1839
533 27-MAR-1839 20:58:11.6
534 27-MAR-1839 20:58:11.57
535 27-MAR-1839 20:58:11.567
536 27-MAR-1839 20:58:11.5668
537 27-MAR-1839 20:58:11.56677
538 ********* | 19-APR-1903
539 ******** | 04/19/1903
540 ******** | 19.04.1903
542 ******** | 1903/04/19
545 ******** | 16 WK 1903
552 19-APR-1903 07:36:05.2
553 19-APR-1903 07:36:05.19
554 19-APR-1903 07:36:05.190
555 19-APR-1903 07:36:05.1896
556 19-APR-1903 07:36:05.18964
557 ********* | 25-AUG-1929
558 ******** | 08/25/1929
559 ******** | 25.08.1929
561 ******** | 1929/08/25
564 ******** | 34 WK 1929
571 25-AUG-1929 15:43:49.8
572 25-AUG-1929 15:43:49.83
573 25-AUG-1929 15:43:49.831
574 25-AUG-1929 15:43:49.8313
575 25-AUG-1929 15:43:49.83132
576 29-SEP-41 | 29-SEP-1941
577 09/29/41 | 09/29/1941
578 29.09.41 | 29.09.1941
580 41/09/29 | 1941/09/29
583 39 WK 41 | 39 WK 1941
590 29-SEP-1941 04:25:09.0
591 29-SEP-1941 04:25:09.01
592 29-SEP-1941 04:25:09.013
593 29-SEP-1941 04:25:09.0129
594 29-SEP-1941 04:25:09.01293
595 19-APR-43 | 19-APR-1943
596 04/19/43 | 04/19/1943
597 19.04.43 | 19.04.1943
599 43/04/19 | 1943/04/19
602 16 WK 43 | 16 WK 1943
609 19-APR-1943 06:49:27.5
610 19-APR-1943 06:49:27.52
611 19-APR-1943 06:49:27.524
612 19-APR-1943 06:49:27.5238
613 19-APR-1943 06:49:27.52375
614 07-OCT-43 | 07-OCT-1943
615 10/07/43 | 10/07/1943
616 07.10.43 | 07.10.1943
618 43/10/07 | 1943/10/07
621 40 WK 43 | 40 WK 1943
628 07-OCT-1943 02:57:52.0
629 07-OCT-1943 02:57:52.02
630 07-OCT-1943 02:57:52.016
631 07-OCT-1943 02:57:52.0156
632 07-OCT-1943 02:57:52.01565
633 17-MAR-92 | 17-MAR-1992
634 03/17/92 | 03/17/1992
635 17.03.92 | 17.03.1992
637 92/03/17 | 1992/03/17
640 11 WK 92 | 11 WK 1992
647 17-MAR-1992 16:45:44.9
648 17-MAR-1992 16:45:44.87
649 17-MAR-1992 16:45:44.865
650 17-MAR-1992 16:45:44.8653
651 17-MAR-1992 16:45:44.86529
652 25-FEB-96 | 25-FEB-1996
653 02/25/96 | 02/25/1996
654 25.02.96 | 25.02.1996
656 96/02/25 | 1996/02/25
666 25-FEB-1996 21:30:57.8
667 25-FEB-1996 21:30:57.82
668 25-FEB-1996 21:30:57.820
669 25-FEB-1996 21:30:57.8205
670 25-FEB-1996 21:30:57.82047
671 29-SEP-41 | 29-SEP-1941
672 09/29/41 | 09/29/1941
673 29.09.41 | 29.09.1941
675 41/09/29 | 1941/09/29
678 39 WK 41 | 39 WK 1941
685 29-SEP-1941 04:25:09.2
686 29-SEP-1941 04:25:09.15
687 29-SEP-1941 04:25:09.154
688 29-SEP-1941 04:25:09.1539
689 29-SEP-1941 04:25:09.15395
690 19-APR-43 | 19-APR-1943
691 04/19/43 | 04/19/1943
692 19.04.43 | 19.04.1943
694 43/04/19 | 1943/04/19
697 16 WK 43 | 16 WK 1943
704 19-APR-1943 06:49:27.1
705 19-APR-1943 06:49:27.11
706 19-APR-1943 06:49:27.105
707 19-APR-1943 06:49:27.1053
708 19-APR-1943 06:49:27.10533
709 07-OCT-43 | 07-OCT-1943
710 10/07/43 | 10/07/1943
711 07.10.43 | 07.10.1943
713 43/10/07 | 1943/10/07
716 40 WK 43 | 40 WK 1943
723 07-OCT-1943 02:57:52.5
724 07-OCT-1943 02:57:52.48
725 07-OCT-1943 02:57:52.482
726 07-OCT-1943 02:57:52.4823
727 07-OCT-1943 02:57:52.48229
728 17-MAR-92 | 17-MAR-1992
729 03/17/92 | 03/17/1992
730 17.03.92 | 17.03.1992
732 92/03/17 | 1992/03/17
735 11 WK 92 | 11 WK 1992
742 17-MAR-1992 16:45:44.7
743 17-MAR-1992 16:45:44.66
744 17-MAR-1992 16:45:44.658
745 17-MAR-1992 16:45:44.6583
746 17-MAR-1992 16:45:44.65827
747 25-FEB-96 | 25-FEB-1996
748 02/25/96 | 02/25/1996
749 25.02.96 | 25.02.1996
751 96/02/25 | 1996/02/25
761 25-FEB-1996 21:30:57.6
762 25-FEB-1996 21:30:57.58
763 25-FEB-1996 21:30:57.582
764 25-FEB-1996 21:30:57.5822
765 25-FEB-1996 21:30:57.58219
766 ********* | 10-NOV-2038
767 ******** | 11/10/2038
768 ******** | 10.11.2038
770 ******** | 2038/11/10
773 ******** | 45 WK 2038
780 10-NOV-2038 22:30:04.2
781 10-NOV-2038 22:30:04.18
782 10-NOV-2038 22:30:04.183
783 10-NOV-2038 22:30:04.1835
784 10-NOV-2038 22:30:04.18347
785 ********* | 18-JUL-2094
786 ******** | 07/18/2094
787 ******** | 18.07.2094
789 ******** | 2094/07/18
792 ******** | 29 WK 2094
799 18-JUL-2094 01:56:51.6
800 18-JUL-2094 01:56:51.59
801 18-JUL-2094 01:56:51.593
802 18-JUL-2094 01:56:51.5932
803 18-JUL-2094 01:56:51.59319
807 AT_SETUP([output invalid dates])
808 AT_DATA([bad-date.sps], [dnl
811 data list list notable/x.
817 print outfile='bad-date.out'/x(date9) ' | ' x(date11).
818 print outfile='bad-date.out'/x(adate8) ' | ' x(adate10).
819 print outfile='bad-date.out'/x(edate8) ' | ' x(edate10).
820 print outfile='bad-date.out'/x(jdate5) ' | ' x(jdate7).
821 print outfile='bad-date.out'/x(sdate8) ' | ' x(sdate10).
822 print outfile='bad-date.out'/x(qyr6) ' | ' x(qyr8).
823 print outfile='bad-date.out'/x(moyr6) ' | ' x(moyr8).
824 print outfile='bad-date.out'/x(wkyr8) ' | ' x(wkyr10).
825 print outfile='bad-date.out'/x(datetime17).
826 print outfile='bad-date.out'/x(datetime18).
827 print outfile='bad-date.out'/x(datetime19).
828 print outfile='bad-date.out'/x(datetime20).
829 print outfile='bad-date.out'/x(datetime21).
830 print outfile='bad-date.out'/x(datetime22).
831 print outfile='bad-date.out'/x(datetime22.1).
832 print outfile='bad-date.out'/x(datetime23.2).
833 print outfile='bad-date.out'/x(datetime24.3).
834 print outfile='bad-date.out'/x(datetime25.4).
835 print outfile='bad-date.out'/x(datetime26.5).
838 AT_CHECK([pspp -O format=csv bad-date.sps])
839 AT_CHECK([cat bad-date.out], [0], [dnl
878 ********* | ***********
879 ******** | **********
880 ******** | **********
882 ******** | **********
885 ******** | **********
892 28-MAY-**** 05:20:00.0
893 28-MAY-**** 05:20:00.00
894 28-MAY-**** 05:20:00.000
895 28-MAY-**** 05:20:00.0000
896 28-MAY-**** 05:20:00.00000
900 AT_SETUP([time output])
901 AT_DATA([time-out.sps], [dnl
903 data list notable /x 1-30 (dtime).
1106 print outfile='time-out.out'/x(time5).
1107 print outfile='time-out.out'/x(time6).
1108 print outfile='time-out.out'/x(time7).
1109 print outfile='time-out.out'/x(time8).
1110 print outfile='time-out.out'/x(time9).
1111 print outfile='time-out.out'/x(time10).
1112 print outfile='time-out.out'/x(time10.1).
1113 print outfile='time-out.out'/x(time11).
1114 print outfile='time-out.out'/x(time11.1).
1115 print outfile='time-out.out'/x(time11.2).
1116 print outfile='time-out.out'/x(time12).
1117 print outfile='time-out.out'/x(time12.1).
1118 print outfile='time-out.out'/x(time12.2).
1119 print outfile='time-out.out'/x(time12.3).
1120 print outfile='time-out.out'/x(time13).
1121 print outfile='time-out.out'/x(time13.1).
1122 print outfile='time-out.out'/x(time13.2).
1123 print outfile='time-out.out'/x(time13.3).
1124 print outfile='time-out.out'/x(time13.4).
1125 print outfile='time-out.out'/x(time14).
1126 print outfile='time-out.out'/x(time14.1).
1127 print outfile='time-out.out'/x(time14.2).
1128 print outfile='time-out.out'/x(time14.3).
1129 print outfile='time-out.out'/x(time14.4).
1130 print outfile='time-out.out'/x(time14.5).
1131 print outfile='time-out.out'/x(time15).
1132 print outfile='time-out.out'/x(time15.1).
1133 print outfile='time-out.out'/x(time15.2).
1134 print outfile='time-out.out'/x(time15.3).
1135 print outfile='time-out.out'/x(time15.4).
1136 print outfile='time-out.out'/x(time15.5).
1137 print outfile='time-out.out'/x(time15.6).
1138 print outfile='time-out.out'/x(dtime8).
1139 print outfile='time-out.out'/x(dtime9).
1140 print outfile='time-out.out'/x(dtime10).
1141 print outfile='time-out.out'/x(dtime11).
1142 print outfile='time-out.out'/x(dtime12).
1143 print outfile='time-out.out'/x(dtime13).
1144 print outfile='time-out.out'/x(dtime13.1).
1145 print outfile='time-out.out'/x(dtime14).
1146 print outfile='time-out.out'/x(dtime14.1).
1147 print outfile='time-out.out'/x(dtime14.2).
1148 print outfile='time-out.out'/x(dtime15).
1149 print outfile='time-out.out'/x(dtime15.1).
1150 print outfile='time-out.out'/x(dtime15.2).
1151 print outfile='time-out.out'/x(dtime15.3).
1152 print outfile='time-out.out'/x(dtime16).
1153 print outfile='time-out.out'/x(dtime16.1).
1154 print outfile='time-out.out'/x(dtime16.2).
1155 print outfile='time-out.out'/x(dtime16.3).
1156 print outfile='time-out.out'/x(dtime16.4).
1157 print outfile='time-out.out'/x(dtime17).
1158 print outfile='time-out.out'/x(dtime17.1).
1159 print outfile='time-out.out'/x(dtime17.2).
1160 print outfile='time-out.out'/x(dtime17.3).
1161 print outfile='time-out.out'/x(dtime17.4).
1162 print outfile='time-out.out'/x(dtime17.5).
1163 print outfile='time-out.out'/x(dtime18).
1164 print outfile='time-out.out'/x(dtime18.1).
1165 print outfile='time-out.out'/x(dtime18.2).
1166 print outfile='time-out.out'/x(dtime18.3).
1167 print outfile='time-out.out'/x(dtime18.4).
1168 print outfile='time-out.out'/x(dtime18.5).
1169 print outfile='time-out.out'/x(dtime18.6).
1172 AT_CHECK([pspp -O format=csv time-out.sps])
1173 AT_CHECK([cat time-out.out], [0], [dnl
13977 AT_SETUP([MONTH output])
13978 AT_DATA([month-out.sps], [dnl
13980 set mxwarns=10000000.
13981 data list notable/x 1-10.
14007 print outfile='month-out.out'/x(month3).
14008 print outfile='month-out.out'/x(month4).
14009 print outfile='month-out.out'/x(month5).
14010 print outfile='month-out.out'/x(month6).
14011 print outfile='month-out.out'/x(month7).
14012 print outfile='month-out.out'/x(month8).
14013 print outfile='month-out.out'/x(month9).
14014 print outfile='month-out.out'/x(month10).
14015 print outfile='month-out.out'/x(month11).
14016 print outfile='month-out.out'/x(month12).
14017 print outfile='month-out.out'/x(month13).
14018 print outfile='month-out.out'/x(month14).
14019 print outfile='month-out.out'/x(month15).
14020 print outfile='month-out.out'/x(month16).
14021 print outfile='month-out.out'/x(month17).
14022 print outfile='month-out.out'/x(month18).
14023 print outfile='month-out.out'/x(month19).
14024 print outfile='month-out.out'/x(month20).
14025 print outfile='month-out.out'/x(month21).
14026 print outfile='month-out.out'/x(month22).
14027 print outfile='month-out.out'/x(month23).
14028 print outfile='month-out.out'/x(month24).
14029 print outfile='month-out.out'/x(month25).
14030 print outfile='month-out.out'/x(month26).
14031 print outfile='month-out.out'/x(month27).
14032 print outfile='month-out.out'/x(month28).
14033 print outfile='month-out.out'/x(month29).
14034 print outfile='month-out.out'/x(month30).
14035 print outfile='month-out.out'/x(month31).
14036 print outfile='month-out.out'/x(month32).
14037 print outfile='month-out.out'/x(month33).
14038 print outfile='month-out.out'/x(month34).
14039 print outfile='month-out.out'/x(month35).
14040 print outfile='month-out.out'/x(month36).
14041 print outfile='month-out.out'/x(month37).
14042 print outfile='month-out.out'/x(month38).
14043 print outfile='month-out.out'/x(month39).
14044 print outfile='month-out.out'/x(month40).
14047 AT_CHECK([pspp -O format=csv month-out.sps], [1], [stdout])
14048 AT_CHECK([[sed '/^$/d' stdout | sort | uniq -c | sed 's/^[ ]*//']], [0],
14050 38 error: Month number 0.000000 is not between 1 and 12.
14051 38 error: Month number 0.500000 is not between 1 and 12.
14052 38 error: Month number 0.900000 is not between 1 and 12.
14053 38 error: Month number 13.000000 is not between 1 and 12.
14055 AT_CHECK([cat month-out.out], [0], [dnl
14933 AT_SETUP([WKDAY output])
14934 AT_DATA([wkday-out.sps], [dnl
14935 set mxwarns=10000000.
14936 set mxerrs=10000000.
14937 data list notable/x 1-10.
14958 do repeat format=wkday2 to wkday40.
14959 print outfile='wkday-out.out'/x(format).
14963 AT_CHECK([pspp -O format=csv wkday-out.sps], [1], [stdout])
14964 AT_CHECK([[sed '/^$/d' stdout | sort | uniq -c | sed 's/^[ ]*//']], [0],
14966 39 error: Weekday number 0.000000 is not between 1 and 7.
14967 39 error: Weekday number 0.500000 is not between 1 and 7.
14968 39 error: Weekday number 0.900000 is not between 1 and 7.
14969 39 error: Weekday number 8.000000 is not between 1 and 7.
14971 AT_CHECK([cat wkday-out.out], [0], [dnl