Repo.t 694B

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 $master = $repo->load_master(source=>'/release/rc.stm');
  12. ok($master, "master is true");
  13. my ($hc,$bc) = $master->parse();
  14. is($hc, 6, "parse() reported 6 headers");
  15. is($bc, 13, "parse() reported 13 non-header lines");
  16. my $slave = $master->generate_slave({ proto => "imap", os => "wxx" });
  17. ok($slave, "slave is true");
  18. &helper::dmup(master=>$master);
  19. &helper::dmup(slave=>$slave);
  20. done_testing();