File: 01-baseline.t

package info (click to toggle)
libcompress-bzip2-perl 2.28-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 3,228 kB
  • sloc: ansic: 5,825; xml: 2,408; perl: 1,098; sh: 255; makefile: 181; pascal: 122
file content (26 lines) | stat: -rw-r--r-- 736 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# -*- mode: perl -*-

use Test::More tests => 6;
#use Test::More qw(no_plan);

our ( $debugf, $BZIP );

do './t/lib.pl';

my $PREFIX = catfile( qw(t 01-tmp) );

#display_file( 'words1' );

foreach my $insuffix ( qw( ref bz2 ) ) {
  my $outsuffix = $insuffix eq 'ref' ? 'bz2' : 'ref';
  foreach my $sampleno ( 1..3 ) {
    my $opts = $insuffix eq 'ref' ? "-$sampleno" : $sampleno < 3 ? "-d" : "-ds";

    system( "$::BZIP $opts  < sample$sampleno.$insuffix > $PREFIX-sample$sampleno-tst.$outsuffix" );
    ok ( compare_binary_files( "sample$sampleno.$outsuffix", "$PREFIX-sample$sampleno-tst.$outsuffix" ),
	 ($insuffix eq 'ref' ? 'compress' : 'uncompress'). " sample$sampleno.$insuffix successful" );
  }
}

#display_file( 'words3' );