/[Sack]/trunk/t/Sack-Digest-BerkeleyDB.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

Contents of /trunk/t/Sack-Digest-BerkeleyDB.t

Parent Directory Parent Directory | Revision Log Revision Log


Revision 34 - (show annotations)
Wed Sep 23 21:47:32 2009 UTC (14 years, 9 months ago) by dpavlin
Original Path: trunk/t/Sack-Digest.t
File MIME type: application/x-troff
File size: 506 byte(s)
move digest to tie interface which works for me

1 #!/usr/bin/perl
2
3 use Test::More tests => 14;
4
5 use lib 'lib';
6
7 BEGIN {
8 use_ok( 'Sack::Digest' );
9 }
10
11 ok( Sack::Digest->clean, 'clean' );
12
13 ok( my $o = Sack::Digest->open( 0 ), 'open' );
14
15 foreach my $full ( 'foo', 'bar', 'baz' ) {
16
17 ok( my $nr = Sack::Digest->to_int( $full ), "to_int $full" );
18 ok( $nr =~ m/^\d+$/, 'int' );
19
20 cmp_ok( Sack::Digest->from_int( $nr ), 'eq', $full, "from_int $nr" );
21
22 }
23
24 cmp_ok( Sack::Digest->from_int( 42 ), '==', 42, 'from_int missing' );
25
26 ok( Sack::Digest->close, 'close' );

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26