add --files option
[rersyncrecent.git] / t / 05-bugtracker.t
blob88dc11b8b8af995135b800b806859136aaac1f6a
1 use Test::More;
2 use strict;
3 my $tests;
4 BEGIN { $tests = 0 }
5 use lib "lib";
6 use File::Path qw(mkpath rmtree);
7 use YAML::Syck ();
9 my $root_from = "t/ta";
10 my $root_to = "t/tb";
11 rmtree [$root_from, $root_to];
14     # empty directory
15     BEGIN { $tests += 5 }
16     mkpath $root_from;
17     my $ret = system $^X, "-Ilib", "bin/rrr-init", $root_from;
18     my $prf = "$root_from/RECENT-1h.yaml";
19     ok(-e $prf, "recent file exists");
20     ok(-l "$root_from/RECENT.recent", "recent symlink exists");
21     my $y = YAML::Syck::LoadFile $prf;
22     ok(! defined $y->{meta}{minmax}{min}, "minmax/min is undef");
23     my $recent = $y->{recent};
24     is(ref $recent, "ARRAY", "recent is an array");
25     ok(0 == scalar @$recent, "array is empty");
28 BEGIN {
29     plan tests => $tests
32 rmtree [$root_from, $root_to];
34 # Local Variables:
35 # mode: cperl
36 # cperl-indent-level: 4
37 # End: