aboutsummaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/tests/bzip2.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tests/bzip2.cpp b/src/tests/bzip2.cpp
index 683d3d7..ef9328f 100644
--- a/src/tests/bzip2.cpp
+++ b/src/tests/bzip2.cpp
@@ -6,17 +6,17 @@ int main( int argc, char *argv[] )
6 char buf[1024]; 6 char buf[1024];
7 size_t nRead; 7 size_t nRead;
8 8
9 Bu::File f( "test.bz2", "wb" ); 9 Bu::File f( "test.bz2", "rb" );
10 Bu::BZip2 bz2( f ); 10 Bu::BZip2 bz2( f );
11 11
12 Bu::File fin( argv[1], "rb"); 12 Bu::File fin( argv[1], "wb");
13 13
14 for(;;) 14 for(;;)
15 { 15 {
16 nRead = fin.read( buf, 1024 ); 16 nRead = bz2.read( buf, 1024 );
17 if( nRead > 0 ) 17 if( nRead > 0 )
18 bz2.write( buf, nRead ); 18 fin.write( buf, nRead );
19 if( fin.isEOS() ) 19 if( bz2.isEOS() )
20 break; 20 break;
21 } 21 }
22} 22}