DISPLAY FILE LABEL: Display in a more natural way.
[pspp-builds.git] / tests / perl-module.at
1 AT_BANNER([Perl module tests])
2
3 dnl This command can be used to run with the PSPP Perl module after it has been
4 dnl built (with "make") but before it has been installed.  The -I options are
5 dnl equivalent to "use ExtUtils::testlib;" inside the Perl program, but it does
6 dnl not need to be run with the perl-module build directory as the current
7 dnl working directory.
8 m4_define([RUN_PERL_MODULE],
9   [LD_LIBRARY_PATH=$abs_top_builddir/src/.libs \
10    $PERL -I$abs_top_builddir/perl-module/blib/arch \
11          -I$abs_top_builddir/perl-module/blib/lib])
12
13 AT_SETUP([Perl create system file])
14 AT_SKIP_IF([test "$WITH_PERL_MODULE" = no])
15 AT_DATA([test.pl],
16   [use warnings;
17    use strict;
18    use PSPP;
19
20    my $d = PSPP::Dict->new();
21    die "dictionary creation" if !ref $d;
22    die if $d->get_var_cnt () != 0;
23
24    $d->set_label ("My Dictionary");
25    $d->set_documents ("These Documents");
26
27    # Tests for variable creation
28
29    my $var0 = PSPP::Var->new ($d, "le");
30    die "trap illegal variable name" if ref $var0;
31    die if $d->get_var_cnt () != 0;
32
33    $var0 = PSPP::Var->new ($d, "legal");
34    die "accept legal variable name" if !ref $var0;
35    die if $d->get_var_cnt () != 1;
36
37    my $var1 = PSPP::Var->new ($d, "money", 
38                               (fmt=>PSPP::Fmt::DOLLAR,
39                                width=>4, decimals=>2) );
40    die "cappet valid format" if !ref $var1;
41    die if $d->get_var_cnt () != 2;
42
43    $d->set_weight ($var1);
44
45    my $sysfile = PSPP::Sysfile->new ('testfile.sav', $d);
46    die "create sysfile object" if !ref $sysfile;
47
48    $sysfile->close ();
49 ])
50 AT_CHECK([RUN_PERL_MODULE test.pl])
51 AT_DATA([dump-dict.sps],
52   [GET FILE='testfile.sav'.
53 DISPLAY FILE LABEL.
54 DISPLAY DOCUMENTS.
55 DISPLAY DICTIONARY.
56 SHOW WEIGHT.
57 ])
58 AT_CHECK([pspp -O format=csv dump-dict.sps], [0],
59   [File label: My Dictionary
60
61 Documents in the active dataset:
62
63 These Documents
64
65 Variable,Description,,Position
66 legal,Format: F9.2,,1
67 ,Measure: Scale,,
68 ,Display Alignment: Right,,
69 ,Display Width: 8,,
70 money,Format: DOLLAR6.2,,2
71 ,Measure: Scale,,
72 ,Display Alignment: Right,,
73 ,Display Width: 8,,
74
75 dump-dict.sps:5: note: SHOW: WEIGHT is money.
76 ])
77 AT_CLEANUP
78
79 AT_SETUP([Perl writing cases to system files])
80 AT_SKIP_IF([test "$WITH_PERL_MODULE" = no])
81 AT_DATA([test.pl],
82   [[use warnings;
83     use strict;
84     use PSPP;
85
86     my $d = PSPP::Dict->new();
87     PSPP::Var->new ($d, "id",
88                     (
89                      fmt=>PSPP::Fmt::F, 
90                      width=>2, 
91                      decimals=>0
92                      )
93                     );
94
95     PSPP::Var->new ($d, "name",
96                            (
97                             fmt=>PSPP::Fmt::A, 
98                             width=>20, 
99                             )
100                            );
101
102     $d->set_documents ("This should not appear");
103     $d->clear_documents ();
104     $d->add_document ("This is a document line");
105
106     $d->set_label ("This is the file label");
107
108     # Check that we can write cases to system files.
109     my $sysfile = PSPP::Sysfile->new ("testfile.sav", $d);
110     my $res = $sysfile->append_case ( [34, "frederick"]);
111     die "append case" if !$res;
112
113     $res = $sysfile->append_case ( [34, "frederick", "extra"]);
114     die "append case with too many variables" if $res;
115     $sysfile->close ();
116
117     # Check that sysfiles are closed properly automaticallly in the destructor.
118     my $sysfile2 = PSPP::Sysfile->new ("testfile2.sav", $d);
119     $res = $sysfile2->append_case ( [21, "wheelbarrow"]);
120     die "append case 2" if !$res;
121
122     $res = $sysfile->append_case ( [34, "frederick", "extra"]);
123     die "append case with too many variables" if $res;
124
125     # Don't close.  We want to test that the destructor does that.
126 ]])
127 AT_CHECK([RUN_PERL_MODULE test.pl])
128 AT_DATA([dump-dicts.sps],
129   [GET FILE='testfile.sav'.
130 DISPLAY DICTIONARY.
131 DISPLAY FILE LABEL.
132 DISPLAY DOCUMENTS.
133 LIST.
134
135 GET FILE='testfile2.sav'.
136 DISPLAY DICTIONARY.
137 DISPLAY FILE LABEL.
138 DISPLAY DOCUMENTS.
139 LIST.
140 ])
141 AT_CHECK([pspp -O format=csv dump-dicts.sps], [0],
142   [Variable,Description,,Position
143 id,Format: F2.0,,1
144 ,Measure: Scale,,
145 ,Display Alignment: Right,,
146 ,Display Width: 8,,
147 name,Format: A20,,2
148 ,Measure: Nominal,,
149 ,Display Alignment: Left,,
150 ,Display Width: 20,,
151
152 File label: This is the file label
153
154 Documents in the active dataset:
155
156 This is a document line
157
158 Table: Data List
159 id,name
160 34,frederick           @&t@
161
162 Variable,Description,,Position
163 id,Format: F2.0,,1
164 ,Measure: Scale,,
165 ,Display Alignment: Right,,
166 ,Display Width: 8,,
167 name,Format: A20,,2
168 ,Measure: Nominal,,
169 ,Display Alignment: Left,,
170 ,Display Width: 20,,
171
172 File label: This is the file label
173
174 Documents in the active dataset:
175
176 This is a document line
177
178 Table: Data List
179 id,name
180 21,wheelbarrow         @&t@
181 ])
182 AT_CLEANUP
183
184 AT_SETUP([Perl write variable parameters])
185 AT_SKIP_IF([test "$WITH_PERL_MODULE" = no])
186 AT_DATA([test.pl],
187   [[use warnings;
188     use strict;
189     use PSPP;
190
191     my $dict = PSPP::Dict->new();
192     die "dictionary creation" if !ref $dict;
193
194     my $int = PSPP::Var->new ($dict, "integer", 
195                               (width=>8, decimals=>0) );
196
197     $int->set_label ("My Integer");
198
199     $int->add_value_label (99, "Silly");
200     $int->clear_value_labels ();
201     $int->add_value_label (0, "Zero");
202     $int->add_value_label (1, "Unity");
203     $int->add_value_label (2, "Duality");
204
205     my $str = PSPP::Var->new ($dict, "string", 
206                               (fmt=>PSPP::Fmt::A, width=>8) );
207
208
209     $str->set_label ("My String");
210     $str->add_value_label ("xx", "foo");
211     $str->add_value_label ("yy", "bar");
212
213     $str->set_missing_values ("this", "that");
214
215     my $longstr = PSPP::Var->new ($dict, "longstring", 
216                               (fmt=>PSPP::Fmt::A, width=>9) );
217
218
219     $longstr->set_label ("My Long String");
220     my $re = $longstr->add_value_label ("xxx", "xfoo");
221
222     $int->set_missing_values (9, 99);
223
224     my $sysfile = PSPP::Sysfile->new ("testfile.sav", $dict);
225
226
227     $sysfile->close ();
228 ]])
229 AT_CHECK([RUN_PERL_MODULE test.pl])
230 AT_DATA([dump-dict.sps],
231   [GET FILE='testfile.sav'.
232 DISPLAY DICTIONARY.
233 ])
234 AT_CHECK([pspp -O format=csv dump-dict.sps], [0],
235   [Variable,Description,,Position
236 integer,My Integer,,1
237 ,Format: F8.0,,
238 ,Measure: Scale,,
239 ,Display Alignment: Right,,
240 ,Display Width: 8,,
241 ,Missing Values: 9; 99,,
242 ,0,Zero,
243 ,1,Unity,
244 ,2,Duality,
245 string,My String,,2
246 ,Format: A8,,
247 ,Measure: Nominal,,
248 ,Display Alignment: Left,,
249 ,Display Width: 8,,
250 ,"Missing Values: ""this    ""; ""that    """,,
251 ,xx      ,foo,
252 ,yy      ,bar,
253 longstring,My Long String,,3
254 ,Format: A9,,
255 ,Measure: Nominal,,
256 ,Display Alignment: Left,,
257 ,Display Width: 9,,
258 ,xxx      ,xfoo,
259 ])
260 AT_CLEANUP
261
262 AT_SETUP([Perl dictionary survives system file])
263 AT_SKIP_IF([test "$WITH_PERL_MODULE" = no])
264 AT_DATA([test.pl],
265   [[use warnings;
266 use strict;
267 use PSPP;
268
269 my $sysfile ;
270
271     {
272         my $d = PSPP::Dict->new();
273
274         PSPP::Var->new ($d, "id",
275                         (
276                          fmt=>PSPP::Fmt::F, 
277                          width=>2, 
278                          decimals=>0
279                          )
280                         );
281
282         $sysfile = PSPP::Sysfile->new ("testfile.sav", $d);
283     }
284
285     my $res = $sysfile->append_case ([3]);
286     print "Dictionary survives sysfile\n" if $res;
287 ]])
288 AT_CHECK([RUN_PERL_MODULE test.pl], [0],
289   [Dictionary survives sysfile
290 ])
291 AT_CLEANUP
292
293 m4_define([PERL_GENERATE_SYSFILE],
294   [AT_DATA([sample.sps],
295     [[data list notable list /string (a8) longstring (a12) numeric (f10) date (date11) dollar (dollar8.2) datetime (datetime17)
296 begin data.
297 1111 One   1 1/1/1 1   1/1/1+01:01
298 2222 Two   2 2/2/2 2   2/2/2+02:02
299 3333 Three 3 3/3/3 3   3/3/3+03:03
300 .    .     . .     .   .
301 5555 Five  5 5/5/5 5   5/5/5+05:05
302 end data.
303
304
305 variable labels string 'A Short String Variable'
306   /longstring 'A Long String Variable'
307   /numeric 'A Numeric Variable'
308   /date 'A Date Variable'
309   /dollar 'A Dollar Variable'
310   /datetime 'A Datetime Variable'.
311
312
313 missing values numeric (9, 5, 999).
314
315 missing values string ("3333").
316
317 add value labels
318   /string '1111' 'ones' '2222' 'twos' '3333' 'threes'
319   /numeric 1 'Unity' 2 'Duality' 3 'Thripality'.
320
321 variable attribute
322     variables = numeric
323     attribute=colour[1]('blue') colour[2]('pink') colour[3]('violet')
324     attribute=size('large') nationality('foreign').
325
326
327 save outfile='sample.sav'.
328 ]])
329    AT_CHECK([pspp -O format=csv sample.sps])])
330
331 AT_SETUP([Perl read system file])
332 AT_SKIP_IF([test "$WITH_PERL_MODULE" = no])
333 PERL_GENERATE_SYSFILE
334 AT_DATA([test.pl],
335   [[use warnings;
336     use strict;
337     use PSPP;
338
339     my $sf = PSPP::Reader->open ("sample.sav");
340
341     my $dict = $sf->get_dict ();
342
343     for (my $v = 0 ; $v < $dict->get_var_cnt() ; $v++)
344     {
345        my $var = $dict->get_var ($v);
346        my $name = $var->get_name ();
347        my $label = $var->get_label ();
348
349        print "Variable $v is \"$name\", label is \"$label\"\n";
350
351        my $vl = $var->get_value_labels ();
352
353        print "Value Labels:\n";
354        print "$_ => $vl->{$_}\n" for keys %$vl;
355     }
356
357     while (my @c = $sf->get_next_case () )
358     {
359        for (my $v = 0; $v < $dict->get_var_cnt(); $v++)
360        {
361            print "val$v: \"$c[$v]\"\n";
362        }
363        print "\n";
364     }
365 ]])
366 AT_CHECK([RUN_PERL_MODULE test.pl], [0],
367   [Variable 0 is "string", label is "A Short String Variable"
368 Value Labels:
369 3333     => threes
370 1111     => ones
371 2222     => twos
372 Variable 1 is "longstring", label is "A Long String Variable"
373 Value Labels:
374 Variable 2 is "numeric", label is "A Numeric Variable"
375 Value Labels:
376 1 => Unity
377 3 => Thripality
378 2 => Duality
379 Variable 3 is "date", label is "A Date Variable"
380 Value Labels:
381 Variable 4 is "dollar", label is "A Dollar Variable"
382 Value Labels:
383 Variable 5 is "datetime", label is "A Datetime Variable"
384 Value Labels:
385 val0: "1111    "
386 val1: "One         "
387 val2: "1"
388 val3: "13197686400"
389 val4: "1"
390 val5: "13197690060"
391
392 val0: "2222    "
393 val1: "Two         "
394 val2: "2"
395 val3: "13231987200"
396 val4: "2"
397 val5: "13231994520"
398
399 val0: "3333    "
400 val1: "Three       "
401 val2: "3"
402 val3: "13266028800"
403 val4: "3"
404 val5: "13266039780"
405
406 val0: ".       "
407 val1: ".           "
408 val2: ""
409 val3: ""
410 val4: ""
411 val5: ""
412
413 val0: "5555    "
414 val1: "Five        "
415 val2: "5"
416 val3: "13334630400"
417 val4: "5"
418 val5: "13334648700"
419
420 ])
421 AT_CLEANUP
422
423 AT_SETUP([Perl copying system files])
424 AT_SKIP_IF([test "$WITH_PERL_MODULE" = no])
425 PERL_GENERATE_SYSFILE
426 AT_DATA([test.pl],
427   [[use warnings;
428     use strict;
429     use PSPP;
430
431     my $input = PSPP::Reader->open ("sample.sav");
432
433     my $dict = $input->get_dict ();
434
435     my $output = PSPP::Sysfile->new ("copy.sav", $dict);
436
437     while (my (@c) = $input->get_next_case () )
438     {
439       $output->append_case (\@c);
440     }
441
442     $output->close ();
443 ]])
444 AT_CHECK([RUN_PERL_MODULE test.pl])
445 AT_DATA([dump-dicts.sps],
446   [GET FILE='sample.sav'.
447 DISPLAY DICTIONARY.
448 LIST.
449
450 GET FILE='copy.sav'.
451 DISPLAY DICTIONARY.
452 LIST.
453 ])
454 AT_CHECK([pspp -O format=csv dump-dicts.sps], [0],
455   [[Variable,Description,,Position
456 string,A Short String Variable,,1
457 ,Format: A8,,
458 ,Measure: Nominal,,
459 ,Display Alignment: Left,,
460 ,Display Width: 8,,
461 ,"Missing Values: ""3333    """,,
462 ,1111    ,ones,
463 ,2222    ,twos,
464 ,3333    ,threes,
465 longstring,A Long String Variable,,2
466 ,Format: A12,,
467 ,Measure: Nominal,,
468 ,Display Alignment: Left,,
469 ,Display Width: 12,,
470 numeric,A Numeric Variable,,3
471 ,Format: F10.0,,
472 ,Measure: Scale,,
473 ,Display Alignment: Right,,
474 ,Display Width: 8,,
475 ,Missing Values: 9; 5; 999,,
476 ,1,Unity,
477 ,2,Duality,
478 ,3,Thripality,
479 ,Custom attributes:,,
480 ,size,large,
481 ,nationality,foreign,
482 ,colour[1],blue,
483 ,colour[2],pink,
484 ,colour[3],violet,
485 date,A Date Variable,,4
486 ,Format: DATE11,,
487 ,Measure: Scale,,
488 ,Display Alignment: Right,,
489 ,Display Width: 8,,
490 dollar,A Dollar Variable,,5
491 ,Format: DOLLAR11.2,,
492 ,Measure: Scale,,
493 ,Display Alignment: Right,,
494 ,Display Width: 8,,
495 datetime,A Datetime Variable,,6
496 ,Format: DATETIME17.0,,
497 ,Measure: Scale,,
498 ,Display Alignment: Right,,
499 ,Display Width: 8,,
500
501 Table: Data List
502 string,longstring,numeric,date,dollar,datetime
503 1111    ,One         ,1,01-JAN-2001,$1.00,01-JAN-2001 01:01
504 2222    ,Two         ,2,02-FEB-2002,$2.00,02-FEB-2002 02:02
505 3333    ,Three       ,3,03-MAR-2003,$3.00,03-MAR-2003 03:03
506 .       ,.           ,.,.,.  ,.
507 5555    ,Five        ,5,05-MAY-2005,$5.00,05-MAY-2005 05:05
508
509 Variable,Description,,Position
510 string,A Short String Variable,,1
511 ,Format: A8,,
512 ,Measure: Nominal,,
513 ,Display Alignment: Left,,
514 ,Display Width: 8,,
515 ,"Missing Values: ""3333    """,,
516 ,1111    ,ones,
517 ,2222    ,twos,
518 ,3333    ,threes,
519 longstring,A Long String Variable,,2
520 ,Format: A12,,
521 ,Measure: Nominal,,
522 ,Display Alignment: Left,,
523 ,Display Width: 12,,
524 numeric,A Numeric Variable,,3
525 ,Format: F10.0,,
526 ,Measure: Scale,,
527 ,Display Alignment: Right,,
528 ,Display Width: 8,,
529 ,Missing Values: 9; 5; 999,,
530 ,1,Unity,
531 ,2,Duality,
532 ,3,Thripality,
533 ,Custom attributes:,,
534 ,size,large,
535 ,nationality,foreign,
536 ,colour[1],blue,
537 ,colour[2],pink,
538 ,colour[3],violet,
539 date,A Date Variable,,4
540 ,Format: DATE11,,
541 ,Measure: Scale,,
542 ,Display Alignment: Right,,
543 ,Display Width: 8,,
544 dollar,A Dollar Variable,,5
545 ,Format: DOLLAR11.2,,
546 ,Measure: Scale,,
547 ,Display Alignment: Right,,
548 ,Display Width: 8,,
549 datetime,A Datetime Variable,,6
550 ,Format: DATETIME17.0,,
551 ,Measure: Scale,,
552 ,Display Alignment: Right,,
553 ,Display Width: 8,,
554
555 Table: Data List
556 string,longstring,numeric,date,dollar,datetime
557 1111    ,One         ,1,01-JAN-2001,$1.00,01-JAN-2001 01:01
558 2222    ,Two         ,2,02-FEB-2002,$2.00,02-FEB-2002 02:02
559 3333    ,Three       ,3,03-MAR-2003,$3.00,03-MAR-2003 03:03
560 .       ,.           ,.,.,.  ,.
561 5555    ,Five        ,5,05-MAY-2005,$5.00,05-MAY-2005 05:05
562 ]])
563 AT_CLEANUP
564
565 AT_SETUP([Perl value formatting])
566 AT_SKIP_IF([test "$WITH_PERL_MODULE" = no])
567 AT_DATA([dd.sps],
568   [DATA LIST LIST /d (DATETIME17).
569 BEGIN DATA.
570 11/9/2001+08:20
571 END DATA.
572
573 SAVE OUTFILE='dd.sav'.
574 ])
575 AT_CHECK([pspp -O format=csv dd.sps], [0],
576   [Table: Reading free-form data from INLINE.
577 Variable,Format
578 d,DATETIME17.0
579 ])
580 AT_DATA([test.pl],
581   [[use warnings;
582     use strict;
583     use PSPP;
584
585     my $sf = PSPP::Reader->open ("dd.sav");
586
587     my $dict = $sf->get_dict ();
588
589     my (@c) = $sf->get_next_case ();
590
591     my $var = $dict->get_var (0);
592     my $val = $c[0];
593     my $formatted = PSPP::format_value ($val, $var);
594     my $str = gmtime ($val - PSPP::PERL_EPOCH);
595     print "Formatted string is \"$formatted\"\n";
596     print "Perl representation is \"$str\"\n";
597 ]])
598 AT_CHECK([RUN_PERL_MODULE test.pl], [0],
599   [[Formatted string is "11-SEP-2001 08:20"
600 Perl representation is "Tue Sep 11 08:20:00 2001"
601 ]])
602 AT_CLEANUP
603
604 AT_SETUP([Perl opening nonexistent file])
605 AT_SKIP_IF([test "$WITH_PERL_MODULE" = no])
606 AT_DATA([test.pl],
607   [[use warnings;
608     use strict;
609     use PSPP;
610
611     my $sf = PSPP::Reader->open ("no-such-file.sav");
612
613     die "Returns undef on opening failure" if ref $sf;
614     print $PSPP::errstr, "\n";
615 ]])
616 AT_CHECK([RUN_PERL_MODULE test.pl], [0],
617   [[Error opening `no-such-file.sav' for reading as a system file: No such file or directory.
618 ]],
619   [[Name "PSPP::errstr" used only once: possible typo at test.pl line 8.
620 ]])
621 AT_CLEANUP
622
623 AT_SETUP([Perl missing values])
624 AT_SKIP_IF([test "$WITH_PERL_MODULE" = no])
625 PERL_GENERATE_SYSFILE
626 AT_DATA([test.pl],
627   [[use warnings;
628     use strict;
629     use PSPP;
630
631     my $sf = PSPP::Reader->open ("sample.sav");
632
633     my $dict = $sf->get_dict ();
634
635     my (@c) = $sf->get_next_case ();
636
637     my $stringvar = $dict->get_var (0);
638     my $numericvar = $dict->get_var (2);
639     my $val = $c[0];
640
641     die "Missing Value Negative String"
642         if PSPP::value_is_missing ($val, $stringvar);
643
644     $val = $c[2];
645
646     die "Missing Value Negative Num"
647         if PSPP::value_is_missing ($val, $numericvar);
648
649     @c = $sf->get_next_case (); 
650     @c = $sf->get_next_case (); 
651
652     $val = $c[0];
653     die "Missing Value Positive"
654         if !PSPP::value_is_missing ($val, $stringvar);
655
656     @c = $sf->get_next_case (); 
657     $val = $c[2];
658     die "Missing Value Positive SYS"
659         if !PSPP::value_is_missing ($val, $numericvar);
660
661     @c = $sf->get_next_case (); 
662     $val = $c[2];
663     die "Missing Value Positive Num"
664         if !PSPP::value_is_missing ($val, $numericvar);
665 ]])
666 AT_CHECK([RUN_PERL_MODULE test.pl])
667 AT_CLEANUP
668
669 AT_SETUP([Perl custom attributes])
670 AT_SKIP_IF([test "$WITH_PERL_MODULE" = no])
671 PERL_GENERATE_SYSFILE
672 AT_DATA([test.pl],
673   [[use warnings;
674     use strict;
675     use PSPP;
676
677     my $sf = PSPP::Reader->open ("sample.sav");
678
679     my $dict = $sf->get_dict ();
680
681     my $var = $dict->get_var_by_name ("numeric");
682
683     my $attr = $var->get_attributes ();
684
685     foreach my $k (keys %$attr)
686     {
687         my $ll = $attr->{$k};
688         print "$k =>";
689         print map "$_\n", join ', ', @$ll;
690     }
691 ]])
692 AT_CHECK([RUN_PERL_MODULE test.pl], [0],
693   [[colour =>blue, pink, violet
694 nationality =>foreign
695 size =>large
696 ]])
697 AT_CLEANUP
698
699 AT_SETUP([Perl Pspp.t])
700 AT_SKIP_IF([test "$WITH_PERL_MODULE" = no])
701 # Skip this test if Perl's Text::Diff module is not installed.
702 AT_CHECK([perl -MText::Diff -e '' || exit 77])
703 AT_CHECK([RUN_PERL_MODULE $abs_top_builddir/perl-module/t/Pspp.t], [0],
704   [[1..36
705 ok 1 - use PSPP;
706 ok 2 - Dictionary Creation
707 ok 3
708 ok 4 - Trap illegal variable name
709 ok 5
710 ok 6 - Accept legal variable name
711 ok 7
712 ok 8 - Trap duplicate variable name
713 ok 9
714 ok 10 - Accept valid format
715 ok 11
716 ok 12 - Create sysfile object
717 ok 13 - Write system file
718 ok 14 - Append Case
719 ok 15 - Appending Case with too many variables
720 ok 16 - existance
721 ok 17 - Append Case 2
722 ok 18 - existance2
723 ok 19 - Check output
724 ok 20 - Dictionary Creation 2
725 ok 21 - Value label for short string
726 ok 22 - Value label for long string
727 ok 23 - Check output 2
728 ok 24 - Dictionary survives sysfile
729 ok 25 - Basic reader operation
730 ok 26 - Streaming of files
731 Formatted string is "11-SEP-2001 08:20"
732 ok 27 - format_value function
733 ok 28 - Perl representation of time
734 ok 29 - Returns undef on opening failure
735 ok 30 - Error string on open failure
736 ok 31 - Missing Value Negative String
737 ok 32 - Missing Value Negative Num
738 ok 33 - Missing Value Positive
739 ok 34 - Missing Value Positive SYS
740 ok 35 - Missing Value Positive Num
741 ok 36 - Custom Attributes
742 ]],
743   [[# @&t@
744 # @@ -0,0 +1 @@
745 # +
746 # @@ -0,0 +1 @@
747 # +
748 # @@ -0,0 +1 @@
749 # +
750 # @@ -0,0 +1 @@
751 # +
752 ]])
753 AT_CLEANUP