3 # Some tests for 'darcs record '
6 use Test
::More
'no_plan';
16 my $test_name = 'issue308 - no patches and no deps for record should abort';
17 like
( darcs
(qw
/record -am foo --ask-deps/), qr/Ok, if you don't want to record anything, that's fine!/i,
22 pass
'test does not work on msys due to stdin oddities';
24 my $test_name = 'RT#476 - --ask-deps works when there are no patches';
27 like
( darcs
(qw
/record -am add/), qr/Finished recording/i, "add file") ;
28 like
( echo_to_darcs
("record -am foo --ask-deps",'a'), qr/finished recording/i, $test_name) ;
29 is
($?
, 0, "record no-patch return code == 0");
33 my $test_name = 'RT#231 - special message is given for nonexistent directories';
34 like
( darcs
(qw
/record -am foo not_there.txt/),qr/non ?existent/i, $test_name) ;
38 my $test_name = 'RT#231 - a nonexistent file before an existing file is handled correctly';
40 like
( darcs
(qw
/record -am foo a.t b.t/),
41 qr/Non ?existent files or directories: "a.t"/i, $test_name) ;
45 my $test_name = 'record works with absolute paths';
50 like
( darcs
(q{record -a -m foo "}
52 .q{/date.t"} ), qr
/Finished recording
/i
, $test_name);
56 my $test_name = 'issue396 - record -l ""';
58 like
( darcs
(qw
/record -am foo -l "" notnull.t/), qr/Finished recording/i, $test_name) ;
62 my $test_name = 'basic record';
64 like
( darcs
(qw
/record -a -m basic_record date.t/), qr/finished recording/i, $test_name);
68 my $test_name = 'testing --logfile';
70 append_file
('log.txt',"second record\n");
71 like
( darcs
(qw
/record -a -m 'second record' --logfile=log.txt date.t/), qr/finished recording/i, $test_name);