1 #!/usr/bin/perl -w #-*-Perl-*-
3 use lib "./t", "./lib";
15 my $RECORDSEP_TESTS = 'undef newline';
16 sub opener { my $a = [@{$_[0]}]; IO::ScalarArray->new($a); }
19 my $T = typical ExtUtils::TBone;
20 Common->test_init(TBone=>$T);
24 my $common_tests = (1 + 1 + 4 + 4 + 3 + 4
25 + Common->test_recordsep_count($RECORDSEP_TESTS));
26 $T->begin($main_tests + $common_tests);
28 # Open a scalar on a string, containing initial data:
29 my @sa = @Common::DATA_SA;
30 my $SAH = IO::ScalarArray->new(\@sa);
31 $T->ok($SAH, "OPEN: open a scalar on a ref to an array");
34 Common->test_print($SAH);
35 Common->test_getc($SAH);
36 Common->test_getline($SAH);
37 Common->test_read($SAH);
38 Common->test_seek($SAH);
39 Common->test_tie(TieArgs => ['IO::ScalarArray', []]);
40 Common->test_recordsep($RECORDSEP_TESTS, \&opener);
42 # So we know everything went well...