File: driver-err.t

package info (click to toggle)
libmixin-extrafields-perl 0.140003-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 220 kB
  • sloc: perl: 411; makefile: 2
file content (24 lines) | stat: -rw-r--r-- 594 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
use strict;
use warnings;

# Let's just test a couple of the failures that should be possible if you screw
# up your driver declaration.

use Test::More tests => 2;
use lib 't/lib';

eval {
  package MEF::Tarkin::Grand;
  require Mixin::ExtraFields;
  Mixin::ExtraFields->import('-fields');
};

like($@, qr/no driver supplied/, "there is no default default driver");

eval {
  package MEF::Tarkin::Grand;
  require Mixin::ExtraFields;
  Mixin::ExtraFields->import(-fields => { driver => '+MEFD::NoCompile' });
};

like($@, qr/compilation failed/i, "we can't use a driver that won't compile!");