Test::Skip::UnlessExistsExecutable3pm
Skips tests unless executable exists
Usage
use Test::More tests => 1;use Test::Skip::UnlessExistsExecutable qw(/usr/bin/rsyncperl);use_ok 'Mouse';# oruse Test::More tests => 1;use Test::Skip::UnlessExistsExecutable;skip_all_unless_exists '/bin/sh';skip_all_unless_exists 'perl';ok 1;
Overview
Test::Skip::UnlessExistsExecutable checks if an executable exist and skips the test if it does not. The intent is to avoid needing to write this sort of boilerplate code:
Test::More;BEGIN {do_i_have_all_my_optional_deps() ? plan skip_all : plan tests => 42}
Interface
Both Test::Skip::UnlessExistsExecutable import method and test_exists_executable method take the name of a program or the file path of executable. It checks if the program exists and is executable.
Source availability
This source is in Github:
http://github.com/dann/p5-test-skip-unlessexistsexecutable
Releases
Unchanged in 2 releases since Debian 12 (Bookworm).