Set initial commit timestamp to be constant.
[git-darcs-import.git] / tests / pending_has_conflicts.pl
blobe7f4c49076dcebf0ef68ccf0179f9e501cf6c339
1 #!/usr/bin/env perl
3 # Some tests for the behavior when there is a conflict in _darcs/patches/pending
5 use lib 'lib/perl';
6 use Test::More 'no_plan';
7 use Test::Darcs;
8 use Shell::Command;
9 use strict;
10 use warnings;
12 init_tmp_repo();
14 open(PENDING,'>_darcs/patches/pending') || die "couldn't open pending: $!";
15 print PENDING '{
16 addfile ./date.t
17 addfile ./date_moved.t
18 move ./date.t ./date_moved.t
19 }';
20 close(PENDING);
22 # now watch the fireworks as all sorts of things fail
23 like( darcs ('whatsnew'), qr/pending has conflicts/, "darcs whatsnew reports 'pending has conflicts'");
25 ####
27 my $revert_output = darcs 'revert -a';
28 like($revert_output, qr/pending has conflicts/, 'darcs revert reports "pending has conflicts"');
30 ###
32 my $record_output = darcs 'record -a -m foo';
33 like($record_output, qr/pending has conflicts/, 'darcs record reports "pending has conflicts"');
35 like( darcs('repair'), qr/The repository is already consistent, no changes made/i, 'darcs repair finds no problem');