3 our @ISA = ('SVN::Delta::Editor');
10 use Test
::More tests
=> 1;
11 use File
::Temp
qw(tempdir);
12 use File
::Path
qw(rmtree);
20 my $repospath = tempdir
('svn-perl-test-XXXXXX', TMPDIR
=> 1, CLEANUP
=> 1);
21 my $repos = SVN
::Repos
::create
("$repospath", undef, undef, undef, undef);
25 diag
"committed ".join(',',@_);
28 my $editor = SVN
::Delta
::Editor
->
29 new
(SVN
::Repos
::get_commit_editor
($repos, "file://$repospath",
30 '/', 'root', 'FOO', \
&committed
));
31 my $rootbaton = $editor->open_root(0);
32 my $dirbaton = $editor->add_directory ('trunk', $rootbaton, undef, 0);
33 my $fbaton = $editor->add_file ('trunk/filea', $dirbaton, undef, -1);
34 my $ret = $editor->apply_textdelta ($fbaton, undef);
35 SVN
::TxDelta
::send_string
("FILEA CONTENT", @
$ret);
36 $editor->close_edit();
38 my $pool = SVN
::Pool
->new_default;
39 SVN
::Repos
::dir_delta
($fs->revision_root (0), '/', '',
40 $fs->revision_root (1), '/',
41 MyEditor
->new (crap
=> bless {}, 'something'),
44 ok
($main::something_destroyed
, 'editor');
49 $main::something_destroyed
++;