1#!perl
2
3use Test::Without::Module ("Module::Runtime");
4use strict ("subs", "vars", "refs");
5use warnings ("all");
6BEGIN { $ENV{CLONE_CHOOSE_PREFERRED_BACKEND} = "Storable"; }
7END { delete $ENV{CLONE_CHOOSE_PREFERRED_BACKEND} } # for VMS
8
9use Test::More;
10
11BEGIN
12{
13    $ENV{CLONE_CHOOSE_PREFERRED_BACKEND} and eval "use $ENV{CLONE_CHOOSE_PREFERRED_BACKEND}; 1;";
14    $@ and plan skip_all => "No $ENV{CLONE_CHOOSE_PREFERRED_BACKEND} found.";
15}
16
17use Clone::Choose;
18
19my @backends = Clone::Choose->get_backends;
20my $backend  = Clone::Choose->backend;
21
22ok($ENV{CLONE_CHOOSE_PREFERRED_BACKEND} and $backend eq $ENV{CLONE_CHOOSE_PREFERRED_BACKEND} or grep { m/^$backend$/ } @backends);
23
24done_testing;
25
26
27