diff options
author | 2013-03-25 20:06:16 +0000 | |
---|---|---|
committer | 2013-03-25 20:06:16 +0000 | |
commit | 898184e3e61f9129feb5978fad5a8c6865f00b92 (patch) | |
tree | 56f32aefc1eed60b534611007c7856f82697a205 /gnu/usr.bin/perl/cpan/Module-Build/t/tilde.t | |
parent | PGSHIFT -> PAGE_SHIFT (diff) | |
download | wireguard-openbsd-898184e3e61f9129feb5978fad5a8c6865f00b92.tar.xz wireguard-openbsd-898184e3e61f9129feb5978fad5a8c6865f00b92.zip |
import perl 5.16.3 from CPAN - worked on by Andrew Fresh and myself
Diffstat (limited to 'gnu/usr.bin/perl/cpan/Module-Build/t/tilde.t')
-rwxr-xr-x | gnu/usr.bin/perl/cpan/Module-Build/t/tilde.t | 20 |
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 ); } |