File: 31stack.t

package info (click to toggle)
liblog-report-perl 1.40-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 568 kB
  • sloc: perl: 2,905; makefile: 8
file content (27 lines) | stat: -rw-r--r-- 576 bytes parent folder | download | duplicates (6)
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
#!/usr/bin/env perl
# test the lexicon index.

use warnings;
use strict;
use lib 'lib', '../lib';

use Test::More tests => 1;

use Log::Report;
use Log::Report::Dispatcher;

my $stack;

my $start = __LINE__;
sub hhh(@) { $stack = Log::Report::Dispatcher->collectStack(3) }
sub ggg(@) { shift; hhh(@_) }
sub fff(@) { ggg(reverse @_) }

fff(42, 3.2, "this is a text");

is_deeply($stack,
  [ [ 'main::hhh(3.2, 42)',                   $0, $start+2 ]
  , [ 'main::ggg("this is a text", 3.2, 42)', $0, $start+3 ]
  , [ 'main::fff(42, 3.2, "this is a text")', $0, $start+5 ]
  ]
);