IO-Compress-Zstd

 view release on metacpan or  search on metacpan

t/compress/generic.pl  view on Meta::CPAN

699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
    ok @lines == 1 && $lines[0] eq $str;
 
    $io = $UncompressClass->new($name);
    ok ! $io->eof;
    my $line = $io->getline();
    ok $line eq $str;
    ok $io->eof;
}
 
{
    local $/ = ""# paragraph mode
    my $io = $UncompressClass->new($name);
    is $., 0;
    is $io->input_line_number, 0;
    ok ! $io->eof;
    my @lines = $io->getlines();
    is $., 2;
    is $io->input_line_number, 2;
    ok $io->eof;
    ok @lines == 2
        or print "# Got " . scalar(@lines) . " lines, expected 2\n" ;

t/compress/generic.pl  view on Meta::CPAN

884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
    $io = $UncompressClass->new($name);
    ok ! $io->eof;
    my $line = $io->getline;
    is $., 1;
    is $io->input_line_number, 1;
    is $line, $str;
    ok $io->eof;
}
 
{
    local $/ = ""# paragraph mode
    my $io = $UncompressClass->new($name);
    ok ! $io->eof;
    my @lines = $io->getlines;
    is $., 2;
    is $io->input_line_number, 2;
    ok $io->eof;
    ok @lines == 2
        or print "# expected 2 lines, got " . scalar(@lines) . "\n";
    ok $lines[0] eq "This is an example\nof a paragraph\n\n\n"
        or print "# [$lines[0]]\n" ;

t/compress/newtied.pl  view on Meta::CPAN

187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
    ok @lines == 1 && $lines[0] eq $str;
 
    $io = $UncompressClass->new($name);
    ok ! $io->eof;
    my $line = <$io>;
    ok $line eq $str;
    ok $io->eof;
}
 
{
    local $/ = ""# paragraph mode
    my $io = $UncompressClass->new($name);
    ok ! $io->eof;
    my @lines = <$io>;
    ok $io->eof;
    ok @lines == 2
        or print "# Got " . scalar(@lines) . " lines, expected 2\n" ;
    ok $lines[0] eq "This is an example\nof a paragraph\n\n\n"
        or print "# $lines[0]\n";
    ok $lines[1] eq "and a single line.\n\n";
}

t/compress/tied.pl  view on Meta::CPAN

228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
    ok @lines == 1 && $lines[0] eq $str;
 
    $io = $UncompressClass->new($name);
    ok ! $io->eof;
    my $line = <$io>;
    ok $line eq $str;
    ok $io->eof;
}
 
{
    local $/ = ""# paragraph mode
    my $io = $UncompressClass->new($name);
    ok ! $io->eof;
    my @lines = <$io>;
    ok $io->eof;
    ok @lines == 2
        or print "# Got " . scalar(@lines) . " lines, expected 2\n" ;
    ok $lines[0] eq "This is an example\nof a paragraph\n\n\n"
        or print "# $lines[0]\n";
    ok $lines[1] eq "and a single line.\n\n";
}

t/compress/tied.pl  view on Meta::CPAN

356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
    ok @lines == 1 && $lines[0] eq $str;
 
    $io = $UncompressClass->new($name);
    ok ! $io->eof;
    my $line = <$io>;
    ok $line eq $str;
    ok $io->eof;
}
 
{
    local $/ = ""# paragraph mode
    my $io = $UncompressClass->new($name);
    ok ! $io->eof;
    my @lines = <$io>;
    ok $io->eof;
    ok @lines == 2
        or print "# expected 2 lines, got " . scalar(@lines) . "\n";
    ok $lines[0] eq "This is an example\nof a paragraph\n\n\n"
        or print "# [$lines[0]]\n" ;
    ok $lines[1] eq "and a single line.\n\n";
}



( run in 0.354 second using v1.01-cache-2.11-cpan-9b1e4054eb1 )