1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
#!perl
use strict;
use warnings;
use Test::More;
use Browser::Open qw(
open_browser
open_browser_cmd
open_browser_cmd_all
);
my $cmd = open_browser_cmd();
if ($cmd) {
ok($cmd, "got command '$cmd'");
SKIP: {
skip "Won't test execution on MSWin32", 1 if $^O eq 'MSWin32';
ok(-x $cmd, '... and we can execute it');
}
diag("Found '$cmd' for '$^O'");
ok(open_browser_cmd_all(), '... and the all commands version is also ok');
}
else {
$cmd = open_browser_cmd_all();
if ($cmd) {
pass("Found command in the 'all' version ($cmd)");
}
else {
diag("$^O - need more data");
pass("We can't make popcorn without corn");
}
}
done_testing();
|