浏览代码

Fix #54: when I saw this I wondered how it worked at all

George S. Baugh 10 年之前
父节点
当前提交
fa5444b6ee
共有 2 个文件被更改,包括 5 次插入3 次删除
  1. 2 1
      Changes
  2. 3 2
      lib/Test/Rail/Parser.pm

+ 2 - 1
Changes

@@ -2,10 +2,11 @@ Revision history for Perl module TestRail::API
 
 0.027 2015-06-12 TEODESIAN
     - If no tests are run (environment fail), set test status to 'retest' on non case-per-ok tests
+    - If the only oddities in a test are passing TODO tests, mark entire run as TODO PASS.
     - Fix issue where having a ~/.testrailrc would prevent make test from allowing install by cpan client
+    - Fix issue where specifying sections past the first defined in a project would fail to restrict spawning to said sections
     - Add Plan Summarizer function
     - Always append the full raw TAP to all results
-    - If the only oddities in a test are passing TODO tests, mark entire run as TODO PASS.
 
 0.026 2015-06-06 TEODESIAN
     - Add --no-match option to testrail-tests to find orphan tests in a tree

+ 3 - 2
lib/Test/Rail/Parser.pm

@@ -224,10 +224,11 @@ sub new {
             confess("Sections passed to spawn must be ARRAYREF") unless (reftype($tropts->{'sections'}) || 'undef') eq 'ARRAY';
             @{$tropts->{'sections'}} = $tr->sectionNamesToIds($tropts->{'project_id'},$tropts->{'spawn'},@{$tropts->{'sections'}});
             foreach my $section (@{$tropts->{'sections'}}) {
-                my $cases = $tr->getCases($tropts->{'project_id'},$tropts->{'spawn'},$section);
-                push(@$cases,@$cases) if (reftype($cases) || 'undef') eq 'ARRAY';
+                my $section_cases = $tr->getCases($tropts->{'project_id'},$tropts->{'spawn'},$section);
+                push(@$cases,@$section_cases) if (reftype($section_cases) || 'undef') eq 'ARRAY';
             }
         }
+
         if (scalar(@$cases)) {
             @$cases = map {$_->{'id'}} @$cases;
         } else {