Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update test #42

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions t/04_resolved_issues.t
Original file line number Diff line number Diff line change
Expand Up @@ -269,19 +269,25 @@ if ($^O ne 'msys') # symlink tests fail on Windows/msys2

### bug 103279
### retain trailing whitespace on filename
{
SKIP: {
ok( 1, "Testing bug 103279" );
my $tar = $Class->new;
isa_ok( $tar, $Class, " Object" );
ok( open my $fh, '>', 'white_space ' );
ok( $tar->add_files( 'white_space ', '' ),
ok( close $fh );
if (-e 'white_space' && $^O eq 'MSWin32') {
# Creating a file under Windows using a name with trailing whitespace
# sometimes results in the created filename being stripped of that
# whitespace. I.e. open './foo ' -> creates './foo'.
# This is known to only happen with *some* versions of Perl for
# Windows, so we must test.
skip 'Windows tries to be clever', 1;
}
ok( $tar->add_files( 'white_space ' ),
" Add file <white_space > containing filename with trailing whitespace");
unlink 'white_space ';
ok( unlink 'white_space ' );
ok( $tar->extract(), " Extract filename with trailing whitespace" );
SKIP: {
skip "Windows tries to be clever", 1 if $^O eq 'MSWin32';
ok( ! -e 'white_space', " <white_space> should not exist" );
}
ok( ! -e 'white_space', " <white_space> should not exist" );
ok( -e 'white_space ', " <white_space > should exist" );
unlink foreach ('white_space ', 'white_space');
}
Loading