File: 00_basic.t

package info (click to toggle)
libcoro-perl 6.570-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,144 kB
  • sloc: ansic: 2,560; perl: 2,122; makefile: 14
file content (25 lines) | stat: -rw-r--r-- 346 bytes parent folder | download | duplicates (8)
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
BEGIN { $| = 1; print "1..5\n"; }

END {print "not ok 1\n" unless $loaded;}

use Coro;
use Coro::EV;
$loaded = 1;

print "ok 1\n";

async {
   print "ok 3\n";
   $var = 7;
   print "ok 4\n";
};

print "ok 2\n";

Coro::EV::timed_io_once \*STDOUT, EV::WRITE
   unless $^O =~ /mswin32/i; # *sigh*
cede;

print $var == 7 ? "ok 5\n" : "not ok 5\n";