File: default-adapter.t

package info (click to toggle)
liblog-any-perl 1.717-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 448 kB
  • sloc: perl: 1,499; makefile: 11
file content (16 lines) | stat: -rw-r--r-- 641 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use strict;
use warnings;
use Test::More tests => 4;
use Log::Any '$log', proxy_class => 'Test', default_adapter => 'Test';

$log->err("this is an error") if $log->is_error;
$log->debugf( "this is a %s with a defined (%s) value and an %s value",
    "debug", [ 1, 2 ], undef )
  if $log->is_debug;
$log->debugf( "this is a %s value", ["multi\nline"] ) if $log->is_debug;
$log->contains_ok( qr/this is an error/, 'got error' );
$log->contains_ok(
    qr/this is a debug with a defined \(\[1,2\]\) value and an <undef> value/,
    'got debug' );
$log->contains_ok( qr/this is a \["multi\\nline"\] value/, 'got multi-line' );
$log->empty_ok();