File: attach_to.t

package info (click to toggle)
libevent-perl 1.15-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 792 kB
  • sloc: ansic: 3,034; perl: 1,128; makefile: 2
file content (14 lines) | stat: -rw-r--r-- 306 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!./perl -w

use strict;
use Test; plan tests => 3;
use Event 0.53;

# $Event::DebugLevel = 3;

my $array = Event->timer(attach_to => [0,1,2], after => 1, cb => \&die);
ok $array->[2], 2;
ok $array->interval, 1;

eval { Event->timer(attach_to => bless([]), after => 1, cb => \&die); };
ok $@, '/blessed/';