File: 09-get_backends.t

package info (click to toggle)
libclone-choose-perl 0.010-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 320 kB
  • sloc: perl: 1,295; makefile: 2
file content (16 lines) | stat: -rw-r--r-- 454 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use Test::More;

BEGIN
{
    $ENV{CLONE_CHOOSE_PREFERRED_BACKEND} and eval "use $ENV{CLONE_CHOOSE_PREFERRED_BACKEND}; 1;";
    $@ and plan skip_all => "No $ENV{CLONE_CHOOSE_PREFERRED_BACKEND} found.";
}

use Clone::Choose;

my @backends = Clone::Choose->get_backends;
my $backend  = Clone::Choose->backend;

ok($ENV{CLONE_CHOOSE_PREFERRED_BACKEND} and $backend eq $ENV{CLONE_CHOOSE_PREFERRED_BACKEND} or grep { m/^$backend$/ } @backends);

done_testing;