Set initial commit timestamp to be constant.
[git-darcs-import.git] / tests / binary.pl
blobb9ac79b662747781ee4a19cbf7dfcb3ced99ddec
1 #!/usr/bin/env perl
3 # Test that _darcs/prefs/binaries
5 use lib 'lib/perl';
6 use Test::More 'no_plan';
7 use Test::Darcs;
8 use strict;
9 use warnings;
10 use Shell::Command;
11 use File::Slurp;
14 my $test = 'binary pattern matches against full path';
15 init_tmp_repo();
16 ok(mkpath('d'), "d created");
17 touch 'd/t.t';
18 darcs 'add d/t.t';
19 darcs 'record -am "initial record"';
20 append_file 'd/t.t','some change' ;
22 my $out = echo_to_darcs 'record --interactive', 'n' ;
23 unlike($out, qr/binary/, "pre-test: plain text files are not binary");
25 append_file '_darcs/prefs/binaries','d/t' ;
27 # we want to see if darcs reports the file as binary or not
28 $out = echo_to_darcs 'record --interactive', 'n' ;
29 like($out, qr/binary/, $test);