Skip Menu |

This queue is for tickets about the Device-Chip CPAN distribution.

Report information
The Basics
Id: 114210
Status: resolved
Priority: 0/
Queue: Device-Chip

People
Owner: Nobody in particular
Requestors: exodist7 [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in:
  • 0.07
  • 0.08
  • 0.09
Fixed in: 0.10



Subject: 0.07 broken on Latest Test-Simple dev release
Date: Fri, 6 May 2016 08:37:04 -0700
To: bug-Device-Chip [...] rt.cpan.org
From: Chad Granum <exodist7 [...] gmail.com>
The new Test-Simple which uses Test2 under the hood will go stable soon. This distribution is broken with the new version. Based on the sample report: http://www.cpantesters.org/cpan/report/68506080 it looks like you are comparing TAP output that includes subtests. In this transition subtest note indentation has changed. For now I am just reporting the issue. I will see if it is easy enough for me to write a patch for you. -Chad
That was remarkably easy, here is a patch.
Subject: 0001-Fix-tests-for-Test2.patch
From 71ebe05bde570ad498a9d8338815560ff3583ac3 Mon Sep 17 00:00:00 2001 From: Chad Granum <exodist7@gmail.com> Date: Fri, 6 May 2016 08:43:47 -0700 Subject: [PATCH] Fix tests for Test2 --- t/50test-gpio.t | 6 ++++-- t/51test-spi.t | 6 ++++-- t/52test-i2c.t | 6 ++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/t/50test-gpio.t b/t/50test-gpio.t index 2ba4d1a..854e53f 100644 --- a/t/50test-gpio.t +++ b/t/50test-gpio.t @@ -8,11 +8,13 @@ use Test::More; use Test::Device::Chip::Adapter; +my $st_indent = $INC{'Test2/API.pm'} ? '' : ' '; + my $adapter = Test::Device::Chip::Adapter->new; my $gpio = $adapter->make_protocol( 'GPIO' )->get; { - test_out( ' # Subtest: ->write_gpios' ); + test_out( "$st_indent# Subtest: ->write_gpios" ); test_out( ' ok 1 - write_gpios' ); test_out( ' 1..1' ); test_out( 'ok 1 - ->write_gpios' ); @@ -26,7 +28,7 @@ my $gpio = $adapter->make_protocol( 'GPIO' )->get; { test_out( 'ok 1 - ->read_gpios returns values' ); - test_out( ' # Subtest: ->read_gpios' ); + test_out( "$st_indent# Subtest: ->read_gpios" ); test_out( ' ok 1 - read_gpios' ); test_out( ' 1..1' ); test_out( 'ok 2 - ->read_gpios' ); diff --git a/t/51test-spi.t b/t/51test-spi.t index 4728e97..6f4d706 100644 --- a/t/51test-spi.t +++ b/t/51test-spi.t @@ -8,13 +8,15 @@ use Test::More; use Test::Device::Chip::Adapter; +my $st_indent = $INC{'Test2/API.pm'} ? '' : ' '; + my $adapter = Test::Device::Chip::Adapter->new; my $spi = $adapter->make_protocol( 'SPI' )->get; ok( defined $spi, 'defined $spi' ); { - test_out( ' # Subtest: ->write' ); + test_out( "$st_indent# Subtest: ->write" ); test_out( ' ok 1 - write' ); test_out( ' 1..1' ); test_out( 'ok 1 - ->write' ); @@ -28,7 +30,7 @@ ok( defined $spi, 'defined $spi' ); { test_out( 'ok 1 - ->readwrite return' ); - test_out( ' # Subtest: ->readwrite' ); + test_out( "$st_indent# Subtest: ->readwrite" ); test_out( ' ok 1 - readwrite' ); test_out( ' 1..1' ); test_out( 'ok 2 - ->readwrite' ); diff --git a/t/52test-i2c.t b/t/52test-i2c.t index fad5691..2e2cb48 100644 --- a/t/52test-i2c.t +++ b/t/52test-i2c.t @@ -8,13 +8,15 @@ use Test::More; use Test::Device::Chip::Adapter; +my $st_indent = $INC{'Test2/API.pm'} ? '' : ' '; + my $adapter = Test::Device::Chip::Adapter->new; my $i2c = $adapter->make_protocol( 'I2C' )->get; ok( defined $i2c, 'defined $i2c' ); { - test_out( ' # Subtest: ->write' ); + test_out( "$st_indent# Subtest: ->write" ); test_out( ' ok 1 - write' ); test_out( ' 1..1' ); test_out( 'ok 1 - ->write' ); @@ -28,7 +30,7 @@ ok( defined $i2c, 'defined $i2c' ); { test_out( 'ok 1 - ->write_then_read return' ); - test_out( ' # Subtest: ->write_then_read' ); + test_out( "$st_indent# Subtest: ->write_then_read" ); test_out( ' ok 1 - write_then_read' ); test_out( ' 1..1' ); test_out( 'ok 2 - ->write_then_read' ); -- 2.8.2
Fails with Test::More 1.302073 - which is a non-development version. -- Alexandr Ciornii, http://chorny.net
0.10 will fix it. -- Paul Evans
Released in 0.10 -- Paul Evans