Skip Menu |

This queue is for tickets about the Text-Frundis CPAN distribution.

Report information
The Basics
Id: 110788
Status: resolved
Priority: 0/
Queue: Text-Frundis

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

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



Subject: Test failures on FreeBSD
The test suite fails on FreeBSD. An overview: http://fast-matrix.cpantesters.org/?dist=Text-Frundis%202.10 Unfortunately there's not enough diagnostic output in t/test.t (probably you should at least use eq($old,$new) instead of ok($old eq $new)). If I add Test::Differences::eq_or_diff, then the difference is clearly visible: not ok 8 - t/data/filters.html # Failed test 't/data/filters.html' # at t/test.t line 113. # +---+-------------------------+---+--------------------+ # | Ln|Got | Ln|Expected | # +---+-------------------------+---+--------------------+ # | 1|'\xab3\xbb | 1|'\xab3\xbb | # | 2|\xab3\xbb | 2|\xab3\xbb | # * 3|\xabblbbla\xbb blbbla\n * 3|\xabblbbla\xbb\s\n * # | | * 4|blbbla * # | 4|more blbbla | 5|more blbbla | # | 5|' | 6|' | # +---+-------------------------+---+--------------------+ I guess that sed is behaving differently on FreeBSD and Linux, if it comes to a missing trailing newline. On Linux: $ echo -n "blabla " | sed -e 's/a/b/' | od -c 0000000 b l b b l a 0000007 On FreeBSD: $ echo -n "blabla " | sed -e 's/a/b/' | od -c 0000000 b l b b l a \n 0000010 Well, I know why I never use sed and stick to "perl -pe 's/.../.../'" ;-)
On Wed Dec 30 13:39:43 2015, SREZIC wrote: Show quoted text
> The test suite fails on FreeBSD. An overview: > http://fast-matrix.cpantesters.org/?dist=Text-Frundis%202.10 > > Unfortunately there's not enough diagnostic output in t/test.t > (probably you should at least use eq($old,$new) instead of ok($old eq > $new)). If I add Test::Differences::eq_or_diff, then the difference is > clearly visible: > > not ok 8 - t/data/filters.html > # Failed test 't/data/filters.html' > # at t/test.t line 113. > # +---+-------------------------+---+--------------------+ > # | Ln|Got | Ln|Expected | > # +---+-------------------------+---+--------------------+ > # | 1|'\xab3\xbb | 1|'\xab3\xbb | > # | 2|\xab3\xbb | 2|\xab3\xbb | > # * 3|\xabblbbla\xbb blbbla\n * 3|\xabblbbla\xbb\s\n * > # | | * 4|blbbla * > # | 4|more blbbla | 5|more blbbla | > # | 5|' | 6|' | > # +---+-------------------------+---+--------------------+ > > I guess that sed is behaving differently on FreeBSD and Linux, if it > comes to a missing trailing newline. On Linux: > > $ echo -n "blabla " | sed -e 's/a/b/' | od -c > 0000000 b l b b l a > 0000007 > > On FreeBSD: > > $ echo -n "blabla " | sed -e 's/a/b/' | od -c > 0000000 b l b b l a > \n > 0000010 > > Well, I know why I never use sed and stick to "perl -pe 's/.../.../'" > ;-)
Many thanks for the reportĀ ! I have (hopefully) fixed the issue (using "perl -pe"), and updated my tests to use Test::Differences.
Resolved in 2.11.