File: basic.t

package info (click to toggle)
libstring-flogger-perl 1.101240-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 112 kB
  • ctags: 4
  • sloc: perl: 107; makefile: 2
file content (30 lines) | stat: -rw-r--r-- 413 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
25
26
27
28
29
30
#!perl
use strict;
use warnings;
use Test::More tests => 4;
use String::Flogger qw(flog);

is(
  flog([ 'foo %s bar', undef ]),
  'foo {{null}} bar',
  "%s <- undef",
);

is(
  flog([ 'foo %s bar', \undef ]),
  'foo ref({{null}}) bar',
  "%s <- \\undef",
);

is(
  flog([ 'foo %s bar', \1 ]),
  'foo ref(1) bar',
  "%s <- \\1",
);

is(
  flog([ 'foo %s bar', \\1 ]),
  'foo ref(ref(1)) bar',
  "%s <- \\\\1",
);