File: IPC-Run3-ProfLogReader.t

package info (click to toggle)
libipc-run3-perl 0.036-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny
  • size: 152 kB
  • ctags: 82
  • sloc: perl: 1,016
file content (42 lines) | stat: -rw-r--r-- 533 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!perl -w

use Test;
use IPC::Run3::ProfLogReader;
use IPC::Run3::ProfArrayBuffer;
use strict;

my $h = IPC::Run3::ProfArrayBuffer->new;

my $r = IPC::Run3::ProfLogReader->new(
    Source  => \*DATA,
    Handler => $h,
);

my @tests = (
sub {
    ok $r->read;
},

sub {
    ok $r->read_all;
},

sub {
    ok 0+$h->get_events, 3, "events read";
},

sub {
    ok( ($h->get_events)[1]->[1]->[1], "there fella" );
},

);

plan tests => 0+@tests;

$_->() for @tests;

__DATA__
\app_call 1.0
hi there\_fella 1.1,1.2,1.3,1.4
\app_exit 1.5