develooper Front page | perl.qa | Postings from December 2016

Re: Test::Buildder v. Test2 subtests

Thread Previous | Thread Next
From:
Ricardo Signes
Date:
December 13, 2016 16:18
Subject:
Re: Test::Buildder v. Test2 subtests
Message ID:
20161213161802.GA23568@debian
* Chad Granum <exodist7@gmail.com> [2016-12-13T11:13:56]
> I would like to see the results when you use
> Test2::Tools::Subtest::subtest_streamed() which is the actual equivalent to
> Test::More::subtest().

Thanks for the pointer.  I have tried this and got identical ("bad") results to
Test2::API::run_subtest:

  ~$ perl foo t2ss
  # Subtest: test
  not ok 1 - Subtest: test
  # Failed test 'Subtest: test'
  # at foo line 24.
  # Caught exception in subtest: 123 at foo line 13.
  1..1
      not ok 1 - subprocess died
      #   Failed test 'subprocess died'
      #   at foo line 11.
      #          got: 0
      #     expected: anything else
      1..1
  not ok 1 - Subtest: test
  # Failed test 'Subtest: test'
  # at foo line 24.
  1..1
  # Looks like you failed 1 test of 1.

Compare to:

  ~$ perl foo t2rs
  # test
  not ok 1 - test
  # Failed test 'test'
  # at foo line 24.
  # Caught exception in subtest: 123 at foo line 13.
  1..1
      not ok 1 - subprocess died
      #   Failed test 'subprocess died'
      #   at foo line 11.
      #          got: 0
      #     expected: anything else
      1..1
  not ok 1 - test
  # Failed test 'test'
  # at foo line 24.
  1..1
  # Looks like you failed 1 test of 1.

The entire difference appears to be "Subtest: test" vs. "test"

-- 
rjbs

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About