1 dnl PSPP - a program for statistical analysis.
2 dnl Copyright (C) 2017 Free Software Foundation, Inc.
4 dnl This program is free software: you can redistribute it and/or modify
5 dnl it under the terms of the GNU General Public License as published by
6 dnl the Free Software Foundation, either version 3 of the License, or
7 dnl (at your option) any later version.
9 dnl This program is distributed in the hope that it will be useful,
10 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 dnl GNU General Public License for more details.
14 dnl You should have received a copy of the GNU General Public License
15 dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
17 AT_BANNER([data output (data-out)])
19 AT_SETUP([numeric format output])
24 my @values = qw(0 2 9.5 27 271 999.95 2718 9999.995 27182 271828
25 2718281 2**39 2**333 2**-21 -2 -9.5 -27 -271 -999.95 -2718 -9999.995
26 -27182 -271828 -2718281 -2**39 -2**333 -2**-21 -0 3.125 31.25 314.125
27 3141.5 31415.875 314159.25 3141592.625 31415926.5 271828182.25
28 3214567890.5 31415926535.875 -3.125 -31.375 -314.125 -3141.5
29 -31415.875 -314159.25 -3141592.625 -31415926.5 -271828182.25
30 -3214567890.5 -31415926535.875);
32 print "SET CCA=',,,'.\n";
33 print "SET CCB='-,[[[,]]],-'.\n";
34 print "SET CCC='((,[,],))'.\n";
35 print "SET CCD=',XXX,,-'.\n";
36 print "SET CCE=',,YYY,-'.\n";
37 print "INPUT PROGRAM.\n";
38 print "STRING EXPR(A16).\n";
39 print map ("COMPUTE NUM=$_.\nCOMPUTE EXPR='$_'.\nEND CASE.\n", @values);
41 print "END INPUT PROGRAM.\n";
43 print "PRINT OUTFILE='output.txt'/EXPR.\n";
44 for my $format (qw (F COMMA DOT DOLLAR PCT E CCA CCB CCC CCD CCE N Z)) {
49 $min_w++ if $format eq 'DOLLAR' || $format eq 'PCT';
50 $min_w = 2 if $min_w == 1 && ($format =~ /^CC/);
54 for my $w ($min_w...40) {
55 my ($f) = "$format$w.$d";
56 print "PRINT OUTFILE='output.txt'/'$f: \"' NUM($f) '\"'.\n";
59 print "PRINT SPACE OUTFILE='output.txt'.\n";
63 AT_CHECK([$PERL num-out.pl > num-out.sps])
64 AT_CHECK([pspp -O format=csv num-out.sps])
65 AT_CHECK([inexactify < output.txt > output.inexact])
66 AT_CHECK([gzip -cd < $top_srcdir/tests/data/num-out.expected.cmp.gz > expout.cmp])
67 AT_DATA([num-out-decmp.pl],
73 if (my ($n) = /^\*(\d+)$/) {
76 $line[3] = " $line[3]";
77 print ' ', join ('', @line), "\n";
79 } elsif (my ($suffix) = /^\$(.*)$/) {
80 for my $c (split ('', $suffix)) {
83 print ' ', join ('', @line), "\n";
85 } elsif (my ($prefix) = /^\^(.*)$/) {
86 for my $c (split ('', $prefix)) {
88 $line[4] = "$c$line[4]";
89 print ' ', join ('', @line), "\n";
92 @line = /^([A-Z]+)(\d+)([^"]+")( *)([^%"]*)(%?")$/;
97 AT_CHECK([$PERL num-out-decmp.pl < expout.cmp > expout.exact])
98 AT_CHECK([[inexactify < expout.exact > expout.inexact]])
99 AT_DATA([num-out-compare.pl],
100 [[#! /usr/bin/perl -w
109 Getopt::Long::Configure ("bundling");
110 GetOptions ("e|exact!" => \$exact,
112 "v|verbose+" => \$verbose,
113 "h|help" => sub { usage (0) })
117 print "$0: compare expected and actual numeric formatting output\n";
118 print "usage: $0 [OPTION...] EXPECTED ACTUAL\n";
119 print "where EXPECTED is the file containing expected output\n";
120 print "and ACTUAL is the file containing actual output.\n";
122 print " -e, --exact: Require numbers to be exactly equal.\n";
123 print " (By default, small differences are permitted.)\n";
124 print " -s, --spss: Ignore most SPSS formatting bugs in EXPECTED.\n";
125 print " (A few differences are not compensated)\n";
126 print " -v, --verbose: Use once to summarize errors and differences.\n";
127 print " Use twice for details of differences.\n";
131 open (EXPECTED, '<', $ARGV[0]) or die "$ARGV[0]: open: $!\n";
132 open (ACTUAL, '<', $ARGV[1]) or die "$ARGV[1]: open: $!\n";
135 my ($approximate) = 0;
140 while (defined (my $a = <EXPECTED>) && defined (my $b = <ACTUAL>)) {
144 if ($a !~ /^\s*$/ && $a !~ /:/) {
150 my ($fmt, $a_out) = $a =~ /^ (.*): "(.*)"$/ or die;
151 my ($b_fmt, $b_out) = $b =~ /^ (.*): "(.*)"$/ or die;
152 die if $fmt ne $b_fmt;
153 die if $a_out eq $b_out;
156 if (increment ($a_out) eq $b_out || increment ($b_out) eq $a_out) {
162 if ($a_out =~ /0.*0/ && $a_out !~ /[1-9]/) {
165 } elsif ($a_out =~ /\*/ && $a_out !~ /^\*+$/) {
168 } elsif ($expr =~ /^-/
170 && $b_out =~ /-\d(\.\d*#*)?E[-+]\d\d\d/
174 } elsif ($expr =~ /^-/
175 && (($a_out !~ /-/ && $a_out =~ /[1-9]/ && $b_out =~ /-/)
176 || ($a_out =~ /^[0-9]+$/ && $b_out =~ /^\*+$/))) {
181 print "$.: $expr in $fmt: expected \"$a_out\", got \"$b_out\"\n"
187 print "Extra lines in $ARGV[0]\n";
192 print "Extra lines in $ARGV[1]\n";
197 print "$errors errors\n";
199 print "$approximate approximate matches\n";
202 print "$bad_round bad rounds\n";
203 print "$spss_wtf1 SPSS WTF 1\n";
204 print "$spss_wtf2 SPSS WTF 2\n";
205 print "$lost_sign lost signs\n";
210 # Returns the argument value incremented by one unit in its final
214 my ($last_digit, $i);
215 for ($i = 0; $i < length $_; $i++) {
216 my ($c) = substr ($_, $i, 1);
218 $last_digit = $i if $c =~ /[0-9]/;
220 return $_ if !defined $last_digit;
221 for ($i = $last_digit; $i >= 0; $i--) {
222 my ($c) = substr ($_, $i, 1);
224 substr ($_, $i, 1) = '0';
225 } elsif ($c =~ /[0-8]/) {
226 substr ($_, $i, 1) = chr (ord ($c) + 1);
230 $_ = "1$_" if $i < 0;
234 AT_CHECK([$PERL num-out-compare.pl $PSPP_NUM_OUT_COMPARE_FLAGS expout.inexact output.inexact])
237 AT_SETUP([non-ASCII custom currency formats])
238 AT_DATA([data-out.sps], [dnl
241 DATA LIST LIST NOTABLE/x.
242 PRINT/x (F8.2) x (CCA10.2).
254 AT_CHECK([pspp -O format=csv data-out.sps], [0], [dnl
255 "data-out.sps:2: note: SHOW: CCA is «,¥,€,»."
267 1.5E+010 ¥2E+010€ @&t@
273 AT_SETUP([binary and hexadecimal output])
274 AT_DATA([binhex-out.sps], [dnl
276 SET MXWARNS=10000000.
278 DATA LIST NOTABLE/x 1-10.
349 FILE HANDLE output/NAME='binhex.out'/MODE=IMAGE/LRECL=256.
350 WRITE OUTFILE=output/
351 x(p1.0) x(p2.0) x(p3.0) x(p4.0) /* 000
352 x(p2.1) x(p3.1) x(p4.1) /* 00a
353 x(p3.2) x(p4.2) /* 013
355 x(pk1.0) x(pk2.0) x(pk3.0) x(pk4.0) /* 01e
356 x(pk2.1) x(pk3.1) x(pk4.1) /* 028
357 x(pk3.2) x(pk4.2) /* 031
359 x(ib1.0) x(ib2.0) x(ib3.0) x(ib4.0) /* 03c
360 x(ib1.1) x(ib2.1) x(ib3.1) x(ib4.1) /* 046
361 x(ib1.2) x(ib2.2) x(ib3.2) x(ib4.2) /* 050
362 x(ib1.3) x(ib2.3) x(ib3.3) x(ib4.3) /* 05a
363 x(ib2.4) x(ib3.4) x(ib4.4) /* 064
364 x(ib2.5) x(ib3.5) x(ib4.5) /* 06d
365 x(ib3.6) x(ib4.6) /* 076
366 x(ib3.7) x(ib4.7) /* 07d
367 x(ib3.8) x(ib4.8) /* 084
370 x(pib1.0) x(pib2.0) x(pib3.0) x(pib4.0) /* 093
371 x(pib1.1) x(pib2.1) x(pib3.1) x(pib4.1) /* 09d
372 x(pib1.2) x(pib2.2) x(pib3.2) x(pib4.2) /* 0a7
373 x(pib1.3) x(pib2.3) x(pib3.3) x(pib4.3) /* 0b1
374 x(pib2.4) x(pib3.4) x(pib4.4) /* 0bb
375 x(pib2.5) x(pib3.5) x(pib4.5) /* 0c4
376 x(pib3.6) x(pib4.6) /* 0cd
377 x(pib3.7) x(pib4.7) /* 0d4
378 x(pib3.8) x(pib4.8) /* 0db
381 x(pibhex2) x(pibhex4) /* 0ea
382 x(pibhex6) x(pibhex8). /* 0f0
386 AT_CHECK([pspp -O format=csv binhex-out.sps])
387 AT_CHECK([gzip -cd < $top_srcdir/tests/data/binhex-out.expected.gz > expout])
388 AT_CHECK([cat binhex.out], [0], [expout])
391 AT_SETUP([output valid dates])
392 AT_DATA([date-out.sps], [dnl
394 data list notable /x 1-30 (datetime).
397 30-6-1680 4:50:38.12301
398 24-7-1716 12:31:35.23453
399 19-6-1768 12:47:53.34505
400 2-8-1819 1:26:0.45615
401 27-3-1839 20:58:11.56677
402 19-4-1903 7:36:5.18964
403 25-8-1929 15:43:49.83132
404 29-9-1941 4:25:9.01293
405 19-4-1943 6:49:27.52375
406 7-10-1943 2:57:52.01565
407 17-3-1992 16:45:44.86529
408 25-2-1996 21:30:57.82047
410 19-4-43 6:49:27.10533
411 7-10-43 2:57:52.48229
412 17-3-92 16:45:44.65827
413 25-2-96 21:30:57.58219
414 10-11-2038 22:30:4.18347
415 18-7-2094 1:56:51.59319
417 print outfile='date-out.out'/x(date9) ' | ' x(date11).
418 print outfile='date-out.out'/x(adate8) ' | ' x(adate10).
419 print outfile='date-out.out'/x(edate8) ' | ' x(edate10).
420 print outfile='date-out.out'/x(jdate5) ' | ' x(jdate7).
421 print outfile='date-out.out'/x(sdate8) ' | ' x(sdate10).
422 print outfile='date-out.out'/x(qyr6) ' | ' x(qyr8).
423 print outfile='date-out.out'/x(moyr6) ' | ' x(moyr8).
424 print outfile='date-out.out'/x(wkyr8) ' | ' x(wkyr10).
425 print outfile='date-out.out'/x(datetime17).
426 print outfile='date-out.out'/x(datetime18).
427 print outfile='date-out.out'/x(datetime19).
428 print outfile='date-out.out'/x(datetime20).
429 print outfile='date-out.out'/x(datetime21).
430 print outfile='date-out.out'/x(datetime22).
431 print outfile='date-out.out'/x(datetime22.1).
432 print outfile='date-out.out'/x(datetime23.2).
433 print outfile='date-out.out'/x(datetime24.3).
434 print outfile='date-out.out'/x(datetime25.4).
435 print outfile='date-out.out'/x(datetime26.5).
438 AT_CHECK([pspp -O format=csv date-out.sps])
439 AT_CHECK([cat date-out.out], [0], [dnl
440 ********* | 10-JUN-1648
441 ******** | 06/10/1648
442 ******** | 10.06.1648
444 ******** | 1648/06/10
447 ******** | 24 WK 1648
454 10-JUN-1648 00:00:00.0
455 10-JUN-1648 00:00:00.00
456 10-JUN-1648 00:00:00.000
457 10-JUN-1648 00:00:00.0000
458 10-JUN-1648 00:00:00.00000
459 ********* | 30-JUN-1680
460 ******** | 06/30/1680
461 ******** | 30.06.1680
463 ******** | 1680/06/30
466 ******** | 26 WK 1680
473 30-JUN-1680 04:50:38.1
474 30-JUN-1680 04:50:38.12
475 30-JUN-1680 04:50:38.123
476 30-JUN-1680 04:50:38.1230
477 30-JUN-1680 04:50:38.12301
478 ********* | 24-JUL-1716
479 ******** | 07/24/1716
480 ******** | 24.07.1716
482 ******** | 1716/07/24
485 ******** | 30 WK 1716
492 24-JUL-1716 12:31:35.2
493 24-JUL-1716 12:31:35.23
494 24-JUL-1716 12:31:35.235
495 24-JUL-1716 12:31:35.2345
496 24-JUL-1716 12:31:35.23453
497 ********* | 19-JUN-1768
498 ******** | 06/19/1768
499 ******** | 19.06.1768
501 ******** | 1768/06/19
504 ******** | 25 WK 1768
511 19-JUN-1768 12:47:53.3
512 19-JUN-1768 12:47:53.35
513 19-JUN-1768 12:47:53.345
514 19-JUN-1768 12:47:53.3450
515 19-JUN-1768 12:47:53.34505
516 ********* | 02-AUG-1819
517 ******** | 08/02/1819
518 ******** | 02.08.1819
520 ******** | 1819/08/02
523 ******** | 31 WK 1819
530 02-AUG-1819 01:26:00.5
531 02-AUG-1819 01:26:00.46
532 02-AUG-1819 01:26:00.456
533 02-AUG-1819 01:26:00.4562
534 02-AUG-1819 01:26:00.45615
535 ********* | 27-MAR-1839
536 ******** | 03/27/1839
537 ******** | 27.03.1839
539 ******** | 1839/03/27
542 ******** | 13 WK 1839
549 27-MAR-1839 20:58:11.6
550 27-MAR-1839 20:58:11.57
551 27-MAR-1839 20:58:11.567
552 27-MAR-1839 20:58:11.5668
553 27-MAR-1839 20:58:11.56677
554 ********* | 19-APR-1903
555 ******** | 04/19/1903
556 ******** | 19.04.1903
558 ******** | 1903/04/19
561 ******** | 16 WK 1903
568 19-APR-1903 07:36:05.2
569 19-APR-1903 07:36:05.19
570 19-APR-1903 07:36:05.190
571 19-APR-1903 07:36:05.1896
572 19-APR-1903 07:36:05.18964
573 ********* | 25-AUG-1929
574 ******** | 08/25/1929
575 ******** | 25.08.1929
577 ******** | 1929/08/25
580 ******** | 34 WK 1929
587 25-AUG-1929 15:43:49.8
588 25-AUG-1929 15:43:49.83
589 25-AUG-1929 15:43:49.831
590 25-AUG-1929 15:43:49.8313
591 25-AUG-1929 15:43:49.83132
592 29-SEP-41 | 29-SEP-1941
593 09/29/41 | 09/29/1941
594 29.09.41 | 29.09.1941
596 41/09/29 | 1941/09/29
599 39 WK 41 | 39 WK 1941
606 29-SEP-1941 04:25:09.0
607 29-SEP-1941 04:25:09.01
608 29-SEP-1941 04:25:09.013
609 29-SEP-1941 04:25:09.0129
610 29-SEP-1941 04:25:09.01293
611 19-APR-43 | 19-APR-1943
612 04/19/43 | 04/19/1943
613 19.04.43 | 19.04.1943
615 43/04/19 | 1943/04/19
618 16 WK 43 | 16 WK 1943
625 19-APR-1943 06:49:27.5
626 19-APR-1943 06:49:27.52
627 19-APR-1943 06:49:27.524
628 19-APR-1943 06:49:27.5238
629 19-APR-1943 06:49:27.52375
630 07-OCT-43 | 07-OCT-1943
631 10/07/43 | 10/07/1943
632 07.10.43 | 07.10.1943
634 43/10/07 | 1943/10/07
637 40 WK 43 | 40 WK 1943
644 07-OCT-1943 02:57:52.0
645 07-OCT-1943 02:57:52.02
646 07-OCT-1943 02:57:52.016
647 07-OCT-1943 02:57:52.0156
648 07-OCT-1943 02:57:52.01565
649 17-MAR-92 | 17-MAR-1992
650 03/17/92 | 03/17/1992
651 17.03.92 | 17.03.1992
653 92/03/17 | 1992/03/17
656 11 WK 92 | 11 WK 1992
663 17-MAR-1992 16:45:44.9
664 17-MAR-1992 16:45:44.87
665 17-MAR-1992 16:45:44.865
666 17-MAR-1992 16:45:44.8653
667 17-MAR-1992 16:45:44.86529
668 25-FEB-96 | 25-FEB-1996
669 02/25/96 | 02/25/1996
670 25.02.96 | 25.02.1996
672 96/02/25 | 1996/02/25
682 25-FEB-1996 21:30:57.8
683 25-FEB-1996 21:30:57.82
684 25-FEB-1996 21:30:57.820
685 25-FEB-1996 21:30:57.8205
686 25-FEB-1996 21:30:57.82047
687 29-SEP-41 | 29-SEP-1941
688 09/29/41 | 09/29/1941
689 29.09.41 | 29.09.1941
691 41/09/29 | 1941/09/29
694 39 WK 41 | 39 WK 1941
701 29-SEP-1941 04:25:09.2
702 29-SEP-1941 04:25:09.15
703 29-SEP-1941 04:25:09.154
704 29-SEP-1941 04:25:09.1539
705 29-SEP-1941 04:25:09.15395
706 19-APR-43 | 19-APR-1943
707 04/19/43 | 04/19/1943
708 19.04.43 | 19.04.1943
710 43/04/19 | 1943/04/19
713 16 WK 43 | 16 WK 1943
720 19-APR-1943 06:49:27.1
721 19-APR-1943 06:49:27.11
722 19-APR-1943 06:49:27.105
723 19-APR-1943 06:49:27.1053
724 19-APR-1943 06:49:27.10533
725 07-OCT-43 | 07-OCT-1943
726 10/07/43 | 10/07/1943
727 07.10.43 | 07.10.1943
729 43/10/07 | 1943/10/07
732 40 WK 43 | 40 WK 1943
739 07-OCT-1943 02:57:52.5
740 07-OCT-1943 02:57:52.48
741 07-OCT-1943 02:57:52.482
742 07-OCT-1943 02:57:52.4823
743 07-OCT-1943 02:57:52.48229
744 17-MAR-92 | 17-MAR-1992
745 03/17/92 | 03/17/1992
746 17.03.92 | 17.03.1992
748 92/03/17 | 1992/03/17
751 11 WK 92 | 11 WK 1992
758 17-MAR-1992 16:45:44.7
759 17-MAR-1992 16:45:44.66
760 17-MAR-1992 16:45:44.658
761 17-MAR-1992 16:45:44.6583
762 17-MAR-1992 16:45:44.65827
763 25-FEB-96 | 25-FEB-1996
764 02/25/96 | 02/25/1996
765 25.02.96 | 25.02.1996
767 96/02/25 | 1996/02/25
777 25-FEB-1996 21:30:57.6
778 25-FEB-1996 21:30:57.58
779 25-FEB-1996 21:30:57.582
780 25-FEB-1996 21:30:57.5822
781 25-FEB-1996 21:30:57.58219
782 ********* | 10-NOV-2038
783 ******** | 11/10/2038
784 ******** | 10.11.2038
786 ******** | 2038/11/10
789 ******** | 45 WK 2038
796 10-NOV-2038 22:30:04.2
797 10-NOV-2038 22:30:04.18
798 10-NOV-2038 22:30:04.183
799 10-NOV-2038 22:30:04.1835
800 10-NOV-2038 22:30:04.18347
801 ********* | 18-JUL-2094
802 ******** | 07/18/2094
803 ******** | 18.07.2094
805 ******** | 2094/07/18
808 ******** | 29 WK 2094
815 18-JUL-2094 01:56:51.6
816 18-JUL-2094 01:56:51.59
817 18-JUL-2094 01:56:51.593
818 18-JUL-2094 01:56:51.5932
819 18-JUL-2094 01:56:51.59319
823 AT_SETUP([output invalid dates])
824 AT_DATA([bad-date.sps], [dnl
827 data list list notable/x.
833 print outfile='bad-date.out'/x(date9) ' | ' x(date11).
834 print outfile='bad-date.out'/x(adate8) ' | ' x(adate10).
835 print outfile='bad-date.out'/x(edate8) ' | ' x(edate10).
836 print outfile='bad-date.out'/x(jdate5) ' | ' x(jdate7).
837 print outfile='bad-date.out'/x(sdate8) ' | ' x(sdate10).
838 print outfile='bad-date.out'/x(qyr6) ' | ' x(qyr8).
839 print outfile='bad-date.out'/x(moyr6) ' | ' x(moyr8).
840 print outfile='bad-date.out'/x(wkyr8) ' | ' x(wkyr10).
841 print outfile='bad-date.out'/x(datetime17).
842 print outfile='bad-date.out'/x(datetime18).
843 print outfile='bad-date.out'/x(datetime19).
844 print outfile='bad-date.out'/x(datetime20).
845 print outfile='bad-date.out'/x(datetime21).
846 print outfile='bad-date.out'/x(datetime22).
847 print outfile='bad-date.out'/x(datetime22.1).
848 print outfile='bad-date.out'/x(datetime23.2).
849 print outfile='bad-date.out'/x(datetime24.3).
850 print outfile='bad-date.out'/x(datetime25.4).
851 print outfile='bad-date.out'/x(datetime26.5).
854 AT_CHECK([pspp -O format=csv bad-date.sps])
855 AT_CHECK([cat bad-date.out], [0], [dnl
894 ********* | ***********
895 ******** | **********
896 ******** | **********
898 ******** | **********
901 ******** | **********
908 28-MAY-**** 05:20:00.0
909 28-MAY-**** 05:20:00.00
910 28-MAY-**** 05:20:00.000
911 28-MAY-**** 05:20:00.0000
912 28-MAY-**** 05:20:00.00000
916 AT_SETUP([time output])
917 AT_DATA([time-out.sps], [dnl
919 data list notable /x 1-30 (dtime).
1122 print outfile='time-out.out'/x(time5).
1123 print outfile='time-out.out'/x(time6).
1124 print outfile='time-out.out'/x(time7).
1125 print outfile='time-out.out'/x(time8).
1126 print outfile='time-out.out'/x(time9).
1127 print outfile='time-out.out'/x(time10).
1128 print outfile='time-out.out'/x(time10.1).
1129 print outfile='time-out.out'/x(time11).
1130 print outfile='time-out.out'/x(time11.1).
1131 print outfile='time-out.out'/x(time11.2).
1132 print outfile='time-out.out'/x(time12).
1133 print outfile='time-out.out'/x(time12.1).
1134 print outfile='time-out.out'/x(time12.2).
1135 print outfile='time-out.out'/x(time12.3).
1136 print outfile='time-out.out'/x(time13).
1137 print outfile='time-out.out'/x(time13.1).
1138 print outfile='time-out.out'/x(time13.2).
1139 print outfile='time-out.out'/x(time13.3).
1140 print outfile='time-out.out'/x(time13.4).
1141 print outfile='time-out.out'/x(time14).
1142 print outfile='time-out.out'/x(time14.1).
1143 print outfile='time-out.out'/x(time14.2).
1144 print outfile='time-out.out'/x(time14.3).
1145 print outfile='time-out.out'/x(time14.4).
1146 print outfile='time-out.out'/x(time14.5).
1147 print outfile='time-out.out'/x(time15).
1148 print outfile='time-out.out'/x(time15.1).
1149 print outfile='time-out.out'/x(time15.2).
1150 print outfile='time-out.out'/x(time15.3).
1151 print outfile='time-out.out'/x(time15.4).
1152 print outfile='time-out.out'/x(time15.5).
1153 print outfile='time-out.out'/x(time15.6).
1154 print outfile='time-out.out'/x(dtime8).
1155 print outfile='time-out.out'/x(dtime9).
1156 print outfile='time-out.out'/x(dtime10).
1157 print outfile='time-out.out'/x(dtime11).
1158 print outfile='time-out.out'/x(dtime12).
1159 print outfile='time-out.out'/x(dtime13).
1160 print outfile='time-out.out'/x(dtime13.1).
1161 print outfile='time-out.out'/x(dtime14).
1162 print outfile='time-out.out'/x(dtime14.1).
1163 print outfile='time-out.out'/x(dtime14.2).
1164 print outfile='time-out.out'/x(dtime15).
1165 print outfile='time-out.out'/x(dtime15.1).
1166 print outfile='time-out.out'/x(dtime15.2).
1167 print outfile='time-out.out'/x(dtime15.3).
1168 print outfile='time-out.out'/x(dtime16).
1169 print outfile='time-out.out'/x(dtime16.1).
1170 print outfile='time-out.out'/x(dtime16.2).
1171 print outfile='time-out.out'/x(dtime16.3).
1172 print outfile='time-out.out'/x(dtime16.4).
1173 print outfile='time-out.out'/x(dtime17).
1174 print outfile='time-out.out'/x(dtime17.1).
1175 print outfile='time-out.out'/x(dtime17.2).
1176 print outfile='time-out.out'/x(dtime17.3).
1177 print outfile='time-out.out'/x(dtime17.4).
1178 print outfile='time-out.out'/x(dtime17.5).
1179 print outfile='time-out.out'/x(dtime18).
1180 print outfile='time-out.out'/x(dtime18.1).
1181 print outfile='time-out.out'/x(dtime18.2).
1182 print outfile='time-out.out'/x(dtime18.3).
1183 print outfile='time-out.out'/x(dtime18.4).
1184 print outfile='time-out.out'/x(dtime18.5).
1185 print outfile='time-out.out'/x(dtime18.6).
1188 AT_CHECK([pspp -O format=csv time-out.sps])
1189 AT_CHECK([cat time-out.out], [0], [dnl
13993 AT_SETUP([MONTH output])
13994 AT_DATA([month-out.sps], [dnl
13996 set mxwarns=10000000.
13997 data list notable/x 1-10.
14023 print outfile='month-out.out'/x(month3).
14024 print outfile='month-out.out'/x(month4).
14025 print outfile='month-out.out'/x(month5).
14026 print outfile='month-out.out'/x(month6).
14027 print outfile='month-out.out'/x(month7).
14028 print outfile='month-out.out'/x(month8).
14029 print outfile='month-out.out'/x(month9).
14030 print outfile='month-out.out'/x(month10).
14031 print outfile='month-out.out'/x(month11).
14032 print outfile='month-out.out'/x(month12).
14033 print outfile='month-out.out'/x(month13).
14034 print outfile='month-out.out'/x(month14).
14035 print outfile='month-out.out'/x(month15).
14036 print outfile='month-out.out'/x(month16).
14037 print outfile='month-out.out'/x(month17).
14038 print outfile='month-out.out'/x(month18).
14039 print outfile='month-out.out'/x(month19).
14040 print outfile='month-out.out'/x(month20).
14041 print outfile='month-out.out'/x(month21).
14042 print outfile='month-out.out'/x(month22).
14043 print outfile='month-out.out'/x(month23).
14044 print outfile='month-out.out'/x(month24).
14045 print outfile='month-out.out'/x(month25).
14046 print outfile='month-out.out'/x(month26).
14047 print outfile='month-out.out'/x(month27).
14048 print outfile='month-out.out'/x(month28).
14049 print outfile='month-out.out'/x(month29).
14050 print outfile='month-out.out'/x(month30).
14051 print outfile='month-out.out'/x(month31).
14052 print outfile='month-out.out'/x(month32).
14053 print outfile='month-out.out'/x(month33).
14054 print outfile='month-out.out'/x(month34).
14055 print outfile='month-out.out'/x(month35).
14056 print outfile='month-out.out'/x(month36).
14057 print outfile='month-out.out'/x(month37).
14058 print outfile='month-out.out'/x(month38).
14059 print outfile='month-out.out'/x(month39).
14060 print outfile='month-out.out'/x(month40).
14063 AT_CHECK([pspp -O format=csv month-out.sps], [1], [stdout])
14064 AT_CHECK([[sed '/^ *
\r*$/d' stdout | sort | uniq -c | sed 's/^[ ]*//']], [0],
14066 38 error: Month number 0.000000 is not between 1 and 12.
14067 38 error: Month number 0.500000 is not between 1 and 12.
14068 38 error: Month number 0.900000 is not between 1 and 12.
14069 38 error: Month number 13.000000 is not between 1 and 12.
14071 AT_CHECK([cat month-out.out], [0], [dnl
14949 AT_SETUP([WKDAY output])
14950 AT_DATA([wkday-out.sps], [dnl
14951 set mxwarns=10000000.
14952 set mxerrs=10000000.
14953 data list notable/x 1-10.
14974 do repeat format=wkday2 to wkday40.
14975 print outfile='wkday-out.out'/x(format).
14979 AT_CHECK([pspp -O format=csv wkday-out.sps], [1], [stdout])
14980 AT_CHECK([[sed '/^ *
\r*$/d' stdout | sort | uniq -c | sed 's/^[ ]*//']], [0],
14982 39 error: Weekday number 0.000000 is not between 1 and 7.
14983 39 error: Weekday number 0.500000 is not between 1 and 7.
14984 39 error: Weekday number 0.900000 is not between 1 and 7.
14985 39 error: Weekday number 8.000000 is not between 1 and 7.
14987 AT_CHECK([cat wkday-out.out], [0], [dnl