Просмотр исходного кода

Fix #114: Don't override filename in TAP parser

George S. Baugh 9 лет назад
Родитель
Сommit
6fffbb90eb
2 измененных файлов с 3 добавлено и 2 удалено
  1. 2 1
      Changes
  2. 1 1
      lib/Test/Rail/Parser.pm

+ 2 - 1
Changes

@@ -1,9 +1,10 @@
 Revision history for Perl module TestRail::API
 
-0.038 2016-08-24 TEODESIAN
+0.038 2016-12-12 TEODESIAN
     - Optimize TestRail::Utils::Find::getResults and testrail-results
     - Add ability to follow POST redirects
     - Don't print stack traces during constructor errors, this can leak auth info into logs
+    - Don't override filename in TAP Parser if we already have it
 
 0.037 2016-08-10 TEODESIAN
     - Fix incorrect POD for TestRail::API::createRunInPlan

+ 1 - 1
lib/Test/Rail/Parser.pm

@@ -359,7 +359,7 @@ sub unknownCallback {
     #XXX I'd love to just rely on the 'name' attr in App::Prove::State::Result::Test, but...
     #try to pick out the filename if we are running this on TAP in files, where App::Prove is uninvolved
     my $file = TestRail::Utils::getFilenameFromTapLine($line);
-    $self->{'file'} = $file if $file;
+    $self->{'file'} = $file if !$self->{'file'} && $file;
     return;
 }