Compression Modules Update for EBCDIC
[p5sagit/p5-mst-13.2.git] / t / lib / compress / multi.pl
index 259447c..cfb5666 100644 (file)
@@ -107,7 +107,11 @@ EOM
                     {
                         $cc = new IO::File "<$name" ;
                     }
+                    my @opts = $unc ne $UncompressClass 
+                                    ? (RawInflate => 1)
+                                    : ();
                     my $gz = new $unc($cc,
+                                   @opts,
                                    Strict      => 1,
                                    AutoClose   => 1,
                                    Append      => 1,
@@ -125,7 +129,7 @@ EOM
                     ok $gz->close(), "    close() ok"
                         or diag "errno $!\n" ;
 
-                    is $gz->streamCount(), $i +1, "    streamCount ok"
+                    is $gz->streamCount(), $i +1, "    streamCount ok " .  ($i +1)
                         or diag "Stream count is " . $gz->streamCount();
                     ok $un eq join('', @buffs), "    expected output" ;
 
@@ -138,7 +142,11 @@ EOM
                     {
                         $cc = new IO::File "<$name" ;
                     }
+                    my @opts = $unc ne $UncompressClass 
+                                    ? (RawInflate => 1)
+                                    : ();
                     my $gz = new $unc($cc,
+                                   @opts,
                                    Strict      => 1,
                                    AutoClose   => 1,
                                    Append      => 1,
@@ -154,7 +162,8 @@ EOM
                         my $lines = @lines;
 
                         my $un = '';
-                        while (<$gz>) {
+                        #while (<$gz>) {
+                        while ($_ = $gz->getline()) {
                             $un .= $_;
                         }
                         is $., $lines, "    \$. is $lines";
@@ -173,7 +182,9 @@ EOM
 
                     {
                         my $un = '';
-                        1 while $gz->read($un) > 0 ;
+                        #1 while $gz->read($un) > 0 ;
+                        is $., 0, "    \$. is 0";
+                        $gz->read($un) ;
                         #print "[[$un]]\n" while $gz->read($un) > 0 ;
                         ok ! $gz->error(), "      ! error()"
                             or diag "Error is " . $gz->error() ;
@@ -182,7 +193,6 @@ EOM
                             or diag "Stream count is " . $gz->streamCount();
                         ok $un eq "", "    expected output" ;
                         is $gz->tell(), 0, "    tell is 0";
-                        is $., 0, "    \$. is 0";
                     }
 
                     is $gz->nextStream(), 0, "    nextStream ok";