/[wait]/trunk/t/document-split.t
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /trunk/t/document-split.t

Parent Directory Parent Directory | Revision Log Revision Log


Revision 88 - (hide annotations)
Mon May 24 13:44:01 2004 UTC (19 years, 11 months ago) by dpavlin
File MIME type: application/x-troff
File size: 1532 byte(s)
move cvs-head to trunk

1 ulpfr 10 # -*- Mode: Perl -*-
2     # document-split.t --
3     # ITIID : $ITI$ $Header $__Header$
4     # Author : Ulrich Pfeifer
5     # Created On : Sun Sep 15 17:10:53 1996
6     # Last Modified By: Ulrich Pfeifer
7     # Last Modified On: Sun Nov 22 18:44:32 1998
8     # Language : CPerl
9     # Update Count : 22
10     # Status : Unknown, Use with caution!
11     #
12     # Copyright (c) 1996-1997, Ulrich Pfeifer
13     #
14    
15     BEGIN { $| = 1; print "1..8\n"; }
16     END {print "not ok 1\n" unless $loaded;}
17     use WAIT::Document::Split;
18     $loaded = 1;
19     print "ok 1\n";
20    
21     $test = 2;
22    
23     my %D;
24     my $x = tie %D, WAIT::Document::Split, 'sep', '\f', 't/test.ste';
25     print ((defined $x)? "ok $test\n" : "not ok $test\n"); $test++;
26     print ((scalar(keys %D) == 16)? "ok $test\n" : "not ok $test\n"); $test++;
27     my $f = $x->FIRSTKEY;
28     my($start, $len) = ($f =~ /(\d+) (\d+)/);
29     print (($start == 0)? "ok $test\n" : "not ok $test\n"); $test++;
30    
31     undef $x;
32     untie %D;
33    
34     my $y = tie %D, WAIT::Document::Split, 'end', '\f', 't/test.ste';
35     print ((defined $y)? "ok $test\n" : "not ok $test\n"); $test++;
36    
37     $f = $y->FIRSTKEY;
38     my ($nlen) = ($f =~ /(\d+)$/);
39     print (($nlen == $len+2)? "ok $test\n" : "not ok $test\n"); $test++;
40    
41     $f = $y->NEXTKEY;
42     ($start) = ($f =~ /(\d+) \d+$/);
43    
44     undef $y;
45     untie %D;
46     $y = tie %D, WAIT::Document::Split, 'start', '\f', 't/test.ste';
47     print ((defined $y)? "ok $test\n" : "not ok $test\n"); $test++;
48     $f = $y->FIRSTKEY;
49     $f = $y->NEXTKEY;
50     my ($nstart) = ($f =~ /(\d+) \d+$/);
51     print (($nstart == $start-2)? "ok $test\n" : "not ok $test\n"); $test++;
52    
53    

Properties

Name Value
cvs2svn:cvs-rev 1.1

  ViewVC Help
Powered by ViewVC 1.1.26