File: 01-basic.t

package info (click to toggle)
libbrowser-open-perl 0.04-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 96 kB
  • sloc: perl: 189; makefile: 2
file content (36 lines) | stat: -rw-r--r-- 676 bytes parent folder | download | duplicates (3)
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();