projects
/
dbsrgits/DBM-Deep.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Intermediate commit prior to radical file format change
[dbsrgits/DBM-Deep.git]
/
t
/
28_transactions.t
1
use strict;
2
use Test::More tests => 4;
3
use Test::Exception;
4
use t::common qw( new_fh );
5
6
use_ok( 'DBM::Deep' );
7
8
my ($fh, $filename) = new_fh();
9
my $db = DBM::Deep->new(
10
file => $filename,
11
);
12
13
$db->{x} = 'y';
14
is( $db->{x}, 'y' );
15
$db->begin_work;
16
$db->{x} = 'z';
17
is( $db->{x}, 'z' );
18
$db->rollback;
19
is( $db->{x}, 'y' );
20
21
# Add a commit test using fork