update readmes
[git-darcs-import.git] / tests / changes_send_context.pl
blob66104da315b408c87e98d573f58802b36f3d5326
1 #!/usr/bin/env perl
3 use lib 'lib/perl';
4 use Test::More qw/no_plan/;
5 use Shell::Command;
6 use Test::Darcs;
7 use Shell::Command;
8 use strict;
10 init_tmp_repo();
13 my $testname = "RT#544 using context created with 8-bit chars";
14 touch 'foo';
15 like ( darcs("record -la -m 'add\212 foo'"), qr/Finished record/,
16 'recorded patch adding foo');
17 my $context = darcs('changes --context');
18 open(CON, ">context");
19 print CON $context;
20 close(CON);
21 system 'date > foo';
22 like ( darcs("record -a -m 'date foo'"), qr/Finished record/,
23 'recorded patch modifying foo');
24 like ( darcs('send -a -o patch --context context .'), qr/Wrote patch to/, $testname );