File: bad_plugin.t

package info (click to toggle)
libnumber-tolerant-perl 1.710-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 372 kB
  • sloc: perl: 757; makefile: 10
file content (15 lines) | stat: -rw-r--r-- 406 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!perl
use Test::More tests => 3;

use strict;
use warnings;

BEGIN { use_ok("Number::Tolerant"); }

# this module can't possibly be loaded:
eval { Number::Tolerant->enable_plugin("..."); };
ok($@, "exception trying to load impossible module");

# this module can be loaded, but isn't a plugin
eval { Number::Tolerant->enable_plugin("Carp"); };
like($@, qr/not a valid .+ plugin/, "Carp isn't a plugin!");