File: 00use.t

package info (click to toggle)
libreadonly-tiny-perl 4-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 108 kB
  • sloc: perl: 314; makefile: 2
file content (26 lines) | stat: -rw-r--r-- 603 bytes parent folder | download
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
#!/usr/bin/perl

use strict;
use warnings;

use Test::More;
use Test::Exports;

my $RT = "Readonly::Tiny";

require_ok $RT or BAIL_OUT "Module will not load!";

import_ok $RT, [],              "default import OK";
is_import qw/readonly/, $RT,    "default imports readonly";
cant_ok qw/readwrite Readonly/, "default only imports readonly";

my @all = qw/readonly readwrite Readonly/;

new_import_pkg;
import_ok $RT, \@all,           "explicit import OK";
is_import @all, $RT,            "explicit import succeeds";

Test::More->builder->is_passing
    or BAIL_OUT "Module will not load!";

done_testing;