summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/perl/cpan/Module-Build/t/tilde.t
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/usr.bin/perl/cpan/Module-Build/t/tilde.t')
-rwxr-xr-xgnu/usr.bin/perl/cpan/Module-Build/t/tilde.t20
1 files changed, 11 insertions, 9 deletions
diff --git a/gnu/usr.bin/perl/cpan/Module-Build/t/tilde.t b/gnu/usr.bin/perl/cpan/Module-Build/t/tilde.t
index a5ed79083b0..04f0210f30b 100755
--- a/gnu/usr.bin/perl/cpan/Module-Build/t/tilde.t
+++ b/gnu/usr.bin/perl/cpan/Module-Build/t/tilde.t
@@ -46,19 +46,20 @@ SKIP: {
unless (defined $home) {
my @info = eval { getpwuid $> };
- skip "No home directory for tilde-expansion tests", 15 if $@;
+ skip "No home directory for tilde-expansion tests", 15 if $@
+ or !defined $info[7];
$home = $info[7];
}
is( run_sample( $p => '~' )->$p(), $home );
- is( run_sample( $p => '~/foo' )->$p(), "$home/foo" );
+ is( run_sample( $p => '~/fooxzy' )->$p(), "$home/fooxzy" );
- is( run_sample( $p => '~/ foo')->$p(), "$home/ foo" );
+ is( run_sample( $p => '~/ fooxzy')->$p(), "$home/ fooxzy" );
is( run_sample( $p => '~/fo o')->$p(), "$home/fo o" );
- is( run_sample( $p => 'foo~' )->$p(), 'foo~' );
+ is( run_sample( $p => 'fooxzy~' )->$p(), 'fooxzy~' );
is( run_sample( prefix => '~' )->prefix,
$home );
@@ -89,24 +90,25 @@ SKIP: {
skip "On OS/2 EMX all users are equal", 2 if $^O eq 'os2';
is( run_sample( $p => '~~' )->$p(), '~~' );
- is( run_sample( $p => '~ foo' )->$p(), '~ foo' );
+ is( run_sample( $p => '~ fooxzy' )->$p(), '~ fooxzy' );
}
# Again, with named users
SKIP: {
my @info = eval { getpwuid $> };
- skip "No home directory for tilde-expansion tests", 1 if $@;
+ skip "No home directory for tilde-expansion tests", 1 if $@
+ or !defined $info[7] or !defined $info[0];
my ($me, $home) = @info[0,7];
- my $expected = "$home/foo";
+ my $expected = "$home/fooxzy";
if ($^O eq 'VMS') {
# Convert the path to UNIX format and trim off the trailing slash
$home = VMS::Filespec::unixify($home);
$home =~ s#/$##;
- $expected = $home . '/../[^/]+' . '/foo';
+ $expected = $home . '/../[^/]+' . '/fooxzy';
}
- like( run_sample( $p => "~$me/foo")->$p(), qr($expected)i );
+ like( run_sample( $p => "~$me/fooxzy")->$p(), qr(\Q$expected\E)i );
}