diff options
author | Stuart Henderson <sthen@cvs.openbsd.org> | 2013-03-25 20:09:38 +0000 |
---|---|---|
committer | Stuart Henderson <sthen@cvs.openbsd.org> | 2013-03-25 20:09:38 +0000 |
commit | 208c15d5473027781eccc551a367f47e87c01709 (patch) | |
tree | 53abb6418128cc702375aff98cbce3c64bcb181d /gnu | |
parent | 141b0349aa40a641262780601db7dde04f77008d (diff) |
import perl 5.16.3 from CPAN - worked on by Andrew Fresh and myself
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/usr.bin/perl/t/porting/pending-author.t | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/gnu/usr.bin/perl/t/porting/pending-author.t b/gnu/usr.bin/perl/t/porting/pending-author.t index 883e5343345..6bc392b35c6 100644 --- a/gnu/usr.bin/perl/t/porting/pending-author.t +++ b/gnu/usr.bin/perl/t/porting/pending-author.t @@ -23,25 +23,29 @@ BEGIN { @INC = '..' if -f '../TestInit.pm'; } -use TestInit qw(T); # T is chdir to the top level +use TestInit qw(T A); # T is chdir to the top level, A makes paths absolute use strict; -use File::Spec; -require './t/test.pl'; +require 't/test.pl'; find_git_or_skip('all'); -my $devnull = File::Spec->devnull; -my @lines = `git status --porcelain 2>$devnull`; -skip_all("git status --porcelain doesn't seem to work here") - if $? != 0; -skip_all("No pending changes") - if !grep !/^\?\?/, @lines; +my $changes; +foreach (`git status --porcelain 2>/dev/null`) { + next if /^\?\?/; + ++$changes; + last; +} + +skip_all("No pending changes (or git status --porcelain doesn't work here)") + unless $changes; sub get { my $key = shift; my $value = `git config --get user.$key`; unless (defined $value && $value =~ /\S/) { - skip_all("git config --get user.$key returned nought"); + plan(1); + like($value, qr/\S/, "git config --get user.$key returned a value"); + exit 1; } chomp $value; return $value; |