File: 10tie.t

package info (click to toggle)
pperl 0.25-5
  • links: PTS
  • area: main
  • in suites: lenny, squeeze
  • size: 296 kB
  • ctags: 40
  • sloc: perl: 868; ansic: 666; makefile: 60; sh: 23
file content (23 lines) | stat: -rw-r--r-- 388 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!perl -w
use strict;
use Test;
BEGIN { plan tests => 10 }

my $db = "foo.$$";
use DB_File;
my %foo;
tie(%foo, 'DB_File', $db, O_RDWR|O_CREAT, 0600)
  or die "couldn't create tie!";

%foo = ( foo => "foo",
         bar => "baz" );
untie(%foo);

my $shouldbe = `$^X t/tie.plx $db 2>&1`;
for(1..10) {
    ok(`./pperl t/tie.plx $db 2>&1`, $shouldbe);
}

unlink $db;

`./pperl -k t/tie.plx`;