Skip Menu |

This queue is for tickets about the Test-Expr CPAN distribution.

Report information
The Basics
Id: 130031
Status: resolved
Priority: 0/
Queue: Test-Expr

People
Owner: Nobody in particular
Requestors: Jeroen.Paasschens [...] synopsys.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Test::Expr does not seem to work with __DATA__
Date: Wed, 10 Jul 2019 18:44:37 +0000
To: "bug-test-expr [...] rt.cpan.org" <bug-test-expr [...] rt.cpan.org>
From: Jeroen Paasschens <Jeroen.Paasschens [...] synopsys.com>
Dear Mr. Conway, It seems that Test::Expr somehow removes in-file DATA (using __DATA__). A simple example: use Test::Expr; plan tests => 1; my $data_content = do { local $/ = undef; <DATA>}; ok $data_content eq "content\n"; __DATA__ content The error I get is 1..1 not ok 1 - $data_content eq "content\n" # Failed test '$data_content eq "content\n"' # at ./jp.pl line 17. # # (do{$data_content eq "content\n"}) was false # because: # $data_content --> "" # # Looks like you failed 1 test of 1. Instead, when replacing Test::Expr with Test::More, the result is fine: 1..1 ok 1 My tests were run with perl 5.28.1. package Test::Expr; our $VERSION = '0.000005'; package PPR; our $VERSION = '0.000022'; package Keyword::Declare; our $VERSION = '0.001010'; package Keyword::Simple; our $VERSION = '0.03'; (since 0.04 has issues on my perl). I have no problem using Data::Dx, so Keyword::Declare is working as expected. Best regards. Show quoted text
________________________________________________________________ Jeroen Paasschens High Tech Campus 41-1.42, 5656 AE Eindhoven, The Netherlands +31 40 2304725
Subject: Re: [rt.cpan.org #130031] Test::Expr does not seem to work with __DATA__
Date: Wed, 10 Jul 2019 21:30:03 +0000
To: bug-Test-Expr [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
Hi Jeroen, This problem with __DATA__ and __END__ was fixed in version 0.001012 of Keyword::Declare, released back in March this year. Your test case (thanks for making it so small! :-) runs correctly under the latest version of the module. All the best, Damian