Repo.t 715B

1234567891011121314151617181920212223242526
  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, "stm is true");
  10. ok($stm->parse_headers(), "parse_headers() returns 6");
  11. ok($stm->parse_headers(), "parse_headers() still returns 6");
  12. is($stm->parse_body(), 13, "parse_body() returns 13");
  13. is($stm->parse_body(), 13, "parse_body() still returns 13");
  14. &helper::dmupp(stm=>$stm);
  15. my $sts = $stm->generate_sts({ proto => "imap" });
  16. ok($sts, "sts is true");
  17. &helper::dmupp(sts=>$sts);
  18. done_testing();