Browse Source

Added basic tests

Alois Mahdal (@azzgoat) 11 years ago
parent
commit
30bf1d8c94
2 changed files with 33 additions and 0 deletions
  1. 18
    0
      t/Repo.t
  2. 15
    0
      t/data/strepo/release/rc.stm

+ 18
- 0
t/Repo.t View File

@@ -0,0 +1,18 @@
1
+use Test::More;
2
+
3
+use lib 'lib';
4
+use helper;
5
+
6
+BEGIN { use_ok( 'SugarTrail::Repo' ); }
7
+require_ok( 'SugarTrail::Repo' );
8
+
9
+my $repo = SugarTrail::Repo->new(root => './t/data/strepo', vcs => 'git');
10
+&helper::dmup(repo=>$repo);
11
+ok($repo,           "repo is true");
12
+
13
+my $stm = $repo->load_stm(stm=>'/release/rc.stm');
14
+&helper::dmup(stm=>$stm);
15
+ok($stm,            "stm is true");
16
+
17
+
18
+done_testing();

+ 15
- 0
t/data/strepo/release/rc.stm View File

@@ -0,0 +1,15 @@
1
+Name: Release Client
2
+Component: ~
3
+Description: Basic release criterion
4
+Owner: some.guy@example.com
5
+Various ISTQB BS: this; that...
6
+
7
+This is the release client protocol.  Here the body starts...
8
+
9
+# Main #
10
+1.  Check A
11
+    > result is a
12
+2. Check IMAPIsm        {proto==imap}
13
+2. Check POP3ism        {proto==pop3}
14
+    > result is OK
15
+