@@ -279,3 +279,31 @@ use_ok( $FileClass );
279279 ok( -e ' white_space ' , " <white_space > should exist" );
280280 unlink foreach (' white_space ' , ' white_space' );
281281}
282+
283+ # ## bug 97748
284+ # ## retain leading '/' for absolute pathnames.
285+ { ok( 1, " Testing bug 97748" );
286+ my $path = ' /absolute/path' ;
287+ my $tar = $Class -> new;
288+ isa_ok( $tar , $Class , " Object" );
289+ my $file ;
290+
291+ ok( $file = $tar -> add_data( $path , ' ' ),
292+ " Added $path " );
293+
294+ ok( $file -> full_path eq $path ,
295+ " Paths mismatch <" . $file -> full_path . " > ne <$path >" );
296+ }
297+
298+ # ## bug 103279
299+ # ## retain trailing whitespace on filename
300+ { ok( 1, " Testing bug 103279" );
301+ my $tar = $Class -> new;
302+ isa_ok( $tar , $Class , " Object" );
303+ ok( $tar -> add_data( ' white_space ' , ' ' ),
304+ " Add file <white_space > containing filename with trailing whitespace" );
305+ ok( $tar -> extract(), " Extract filename with trailing whitespace" );
306+ ok( ! -e ' white_space' , " <white_space> should not exist" );
307+ ok( -e ' white_space ' , " <white_space > should exist" );
308+ unlink foreach (' white_space ' , ' white_space' );
309+ }
0 commit comments