diff options
author | Nicholas Clark <nick@ccl4.org> | 2011-06-19 20:34:37 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2011-06-22 22:41:15 +0200 |
commit | 9c86860c5a5d33ce2b09c38114c6017a4dc29975 (patch) | |
tree | 4d8bdca04d0bbddb6701efe48114482ff58a1bce /t/test.pl | |
parent | 18388fdbd6a991f0d3b0c3df220014d82e8e4ff4 (diff) | |
download | perl-9c86860c5a5d33ce2b09c38114c6017a4dc29975.tar.gz |
Add find_git_or_skip(), which skips if we are not in a git checkout.
Diffstat (limited to 't/test.pl')
-rw-r--r-- | t/test.pl | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -152,6 +152,13 @@ sub skip_all_without_config { } } +sub find_git_or_skip { + return if -d '.git'; + my $reason = 'not being run from a git checkout'; + skip_all($reason) if $_[0] && $_[0] eq 'all'; + skip($reason, @_); +} + sub _ok { my ($pass, $where, $name, @mess) = @_; # Do not try to microoptimize by factoring out the "not ". |