Repo.t 630B

12345678910111213141516171819202122232425
  1. use Test::More;
  2. use lib 'lib';
  3. use helper;
  4. BEGIN { use_ok( 'SugarTrail::Repo' ); }
  5. require_ok( 'SugarTrail::Repo' );
  6. my $repo = SugarTrail::Repo->new(root => './t/data/strepo', vcs => 'git');
  7. ok($repo, "repo is true");
  8. my $stm = $repo->load_stm(stm=>'/release/rc.stm');
  9. ok($stm, "master is true");
  10. my ($hc,$bc) = $stm->parse();
  11. is($hc, 6, "parse() reported 6 headers");
  12. is($bc, 13, "parse() reported 13 non-header lines");
  13. my $sts = $stm->generate_slave({ proto => "imap", os => "wxx" });
  14. ok($sts, "slave is true");
  15. &helper::dmup(master=>$stm);
  16. &helper::dmup(slave=>$sts);
  17. done_testing();