Skip to content

Commit d769b7a

Browse files
committed
Add failing test to demonstrate unicode mishandling
As mentioned in #2 Pod::Parser doesn't handle encodings, which may cause some form of failure. Here in order to understand this, and in the attempt to add a failing test that can be fixed with the correct behaviour, we add a simple test fixture UnicodeHeading that refers to U+1F3A9, the Top Hat in a pod heading. At present it doesn't fail, so more work needed.
1 parent 5586c4e commit d769b7a

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

t/lib/UnicodeHeading.pm

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package UnicodeHeading;
2+
# Unicode subroutine names and pod
3+
4+
=head2 $self->get_hat 🎩
5+
6+
something somthing
7+
8+
=cut
9+
10+
sub get_hat {}
11+
12+
13+
14+
1;
15+

t/unicode_heading.t

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/perl -w
2+
use strict;
3+
use Test::More tests => 3;
4+
use lib 't/lib';
5+
6+
BEGIN {
7+
use_ok( 'Pod::Coverage' );
8+
}
9+
10+
my $obj = new Pod::Coverage package => 'UnicodeHeading';
11+
isa_ok( $obj, 'Pod::Coverage' );
12+
is($obj->coverage, 1, "Wasn't confused by Unicode in the header");

0 commit comments

Comments
 (0)