ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Guard/t/02_guard.t
Revision: 1.2
Committed: Sat Dec 13 19:14:58 2008 UTC (15 years, 5 months ago) by root
Content type: application/x-troff
Branch: MAIN
CVS Tags: rel-1_02, rel-1_0, rel-1_021, rel-1_023, rel-1_022, rel-0_5, rel-1_01, HEAD
Changes since 1.1: +1 -1 lines
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 root 1.1 BEGIN { $| = 1; print "1..11\n"; }
2    
3     use Guard;
4    
5     print "ok 1\n";
6    
7     {
8     my $guard = guard { print "ok 3\n" };
9     print "ok 2\n";
10     }
11    
12     print "ok 4\n";
13    
14     {
15     my $guard = guard { print "not ok 6\n" };
16     print "ok 5\n";
17 root 1.2 $guard->cancel;
18 root 1.1 }
19    
20     print "ok 6\n";
21    
22     {
23     my $guard = guard { print "ok 9\n" };
24     my $guard2 = $guard;
25     print "ok 7\n";
26     undef $guard;
27     print "ok 8\n";
28     undef $guard2;
29     print "ok 10\n";
30     }
31    
32     print "ok 11\n";
33