Browse Source

Added basic Slave-specific test

Alois Mahdal 11 years ago
parent
commit
c7e08f2970
2 changed files with 43 additions and 0 deletions
  1. 21
    0
      t/Slave.t
  2. 22
    0
      t/data/strepo/selftest/posititve/multiple_parameters.stm

+ 21
- 0
t/Slave.t View File

@@ -0,0 +1,21 @@
1
+use Test::More;
2
+
3
+use lib 'lib';
4
+use helper;
5
+use SugarTrail::Repo;
6
+
7
+my $repo = SugarTrail::Repo->new(root => './t/data/strepo', vcs => 'git');
8
+
9
+
10
+my $m1 = $repo->load_stm(stm=>'/selftest/posititve/multiple_parameters.stm');
11
+ok($m1,             "multiple_parameters: master is true");
12
+
13
+$m1->parse();
14
+
15
+my $s1 = $m1->generate_slave({ proto => "imap", os => "w7a" });
16
+ok($s1,            "multiple_parameters: slave is true");
17
+
18
+&helper::dmup(s1=>\$s1);
19
+&helper::dmup(m1=>\$m1);
20
+
21
+done_testing();

+ 22
- 0
t/data/strepo/selftest/posititve/multiple_parameters.stm View File

@@ -0,0 +1,22 @@
1
+Name: Multple parameters
2
+Component: ~
3
+Description: SugarTrail positive self-test on multiple parameters
4
+Owner: some.guy@example.com
5
+Various ISTQB BS: this; that...
6
+Cartesian: proto=imap; proto=pop3; os=w7a; os=wxx; os=wva; os=w8x; arch=amd64; arch=x86
7
+
8
+This is the release client protocol.  Here the body starts...
9
+
10
+# Main #
11
+1.  Check A
12
+    > result is a
13
+2. Check IMAPism on XP  {proto==imap;   os==wxx}
14
+2. Check IMAPism on 7   {proto==imap;   os==w7a}
15
+2. Check POP3ism on XP  {proto==pop3;   os==wxx}
16
+2. Check POP3ism in 7   {proto==pop3;   os==w7a}
17
+    > result is OK
18
+3. Some XP thing        {os==wxx}
19
+3. Some Win7 thing      {os=~w7a}
20
+4. Some amd64 thing     {os=@w8a,ws23a,ws28a,ws212a,w7a,wva,wxa}
21
+
22
+Some final comments.