File: 005-message-indent.t

package info (click to toggle)
libdevel-stacktrace-withlexicals-perl 2.01-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 232 kB
  • ctags: 121
  • sloc: perl: 1,531; makefile: 2
file content (17 lines) | stat: -rw-r--r-- 353 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use strict;
use warnings;
use Test::More tests => 2;
use Devel::StackTrace;
use Devel::StackTrace::WithLexicals;

sub foo {
    return Devel::StackTrace::WithLexicals->new(message => "blah", indent => 1);
}

my $t = foo();
my $trace = $t->as_string;

unlike $trace, qr/^Trace begun/, "has the message";
like $trace, qr/^\tmain::foo/m, "indent works";