File: rt83267-begin.t

package info (click to toggle)
liblog-contextual-perl 0.009001-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 432 kB
  • sloc: perl: 889; makefile: 2
file content (24 lines) | stat: -rw-r--r-- 434 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
use strict;
use warnings;

use Test::More;

BEGIN {
  eval {
    package NotMain;
    use Log::Contextual::SimpleLogger;

    use Log::Contextual qw(:log),
      -default_logger =>
      Log::Contextual::SimpleLogger->new({levels => [qw( )]});

    eval {
      log_info { "Yep" }
    };
    ::is($@, '', 'Invoked log function in package other than main');
  };

  is($@, '', 'non-main package subtest did not die');
}

done_testing;