From 867f310a007747a888890016fa63509a5c64f85e Mon Sep 17 00:00:00 2001 From: "Andreas J. Koenig" Date: Sat, 19 Feb 2011 07:13:08 +0100 Subject: [PATCH] initial --- t/05-bugtracker.t | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 t/05-bugtracker.t diff --git a/t/05-bugtracker.t b/t/05-bugtracker.t new file mode 100644 index 0000000..88dc11b --- /dev/null +++ b/t/05-bugtracker.t @@ -0,0 +1,37 @@ +use Test::More; +use strict; +my $tests; +BEGIN { $tests = 0 } +use lib "lib"; +use File::Path qw(mkpath rmtree); +use YAML::Syck (); + +my $root_from = "t/ta"; +my $root_to = "t/tb"; +rmtree [$root_from, $root_to]; + +{ + # empty directory + BEGIN { $tests += 5 } + mkpath $root_from; + my $ret = system $^X, "-Ilib", "bin/rrr-init", $root_from; + my $prf = "$root_from/RECENT-1h.yaml"; + ok(-e $prf, "recent file exists"); + ok(-l "$root_from/RECENT.recent", "recent symlink exists"); + my $y = YAML::Syck::LoadFile $prf; + ok(! defined $y->{meta}{minmax}{min}, "minmax/min is undef"); + my $recent = $y->{recent}; + is(ref $recent, "ARRAY", "recent is an array"); + ok(0 == scalar @$recent, "array is empty"); +} + +BEGIN { + plan tests => $tests +} + +rmtree [$root_from, $root_to]; + +# Local Variables: +# mode: cperl +# cperl-indent-level: 4 +# End: -- 2.11.4.GIT