3 # A test for a missed resolution, inspired by bug #10 in RT
6 use Test
::More
'no_plan';
10 use File
::Temp
'tempdir';
11 my $work_dir = tempdir
( CLEANUP
=> 1 );
15 for my $dir (qw
/tmp1 tmp2/) {
17 mkpath
("$dir/") || die "couldn't mkpath: $!";
31 writeLines
("i\n\nm\nb\nv\n");
34 darcs
"record -m 'add' --all";
38 darcs
"pull --all ../tmp1";
39 writeLines
("J\ni\n\nC2\n\nm\nD\nb\nv\n");
40 darcs
"record -m 'change2' --all";
44 writeLines
("I\ni\n\nC1\n\nm\nb\n");
46 darcs
"record -m 'change1' --all";
48 darcs
"pull --all ../tmp2";
50 # we should have a marked conflict now.
51 # we resolve it simply by removing conflict markers.
53 # I'm too lazy to translate this to Perl right now.
54 `grep -v '\(\^ \^\|\*\*\|v v\)' A > tmp`;
57 darcs
"record -m 'mark-conflicts' --all";
59 # now resolve shouldn't find any unresolved conflicts
60 like
( darcs
('resolve'), qr/No conflicts to mark/, 'darcs finds no conflicts to mark');