File: rt83267.t

package info (click to toggle)
liblog-contextual-perl 0.008001-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 340 kB
  • sloc: perl: 681; makefile: 2
file content (21 lines) | stat: -rw-r--r-- 429 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
use strict;
use warnings;
use Test::More 'no_plan';

#bug report does not include a case where Log::Contextual is
#brought in via 'use'

#try to import a single log function but do not include any tags
BEGIN {
   require Log::Contextual;
   Log::Contextual->import('log_info');
}

eval {
   log_info { "test" };
};
like(
   $@,
   qr/^ no logger set!  you can't try to log something without a logger!/,
   'Got correct error'
);