Repo.t 672B

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