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