Skip to content

Commit

Permalink
Update t/get-w3-latin1-utf8.t
Browse files Browse the repository at this point in the history
Simpler, less confusing, test code.  Fancy buf decoding did nothing useful.
  • Loading branch information
ronaldxs committed Aug 30, 2012
1 parent 2b40128 commit 7d798b7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions t/get-w3-latin1-utf8.t
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ use LWP::Simple;

my $html = LWP::Simple.get('http://www.w3.org/2006/11/mwbp-tests/test-encoding-8.html');

my $find_char = Buf.new(0xE9).decode('iso-8859-1');
my $find_char = chr(233); # small e with acute
ok(
$html.match('</html>') && $html.match($find_char),
'Got latin-1 page'
);

$html = LWP::Simple.get('http://www.w3.org/2006/11/mwbp-tests/test-encoding-3.html');
$find_char = Buf.new(0xC3, 0xA9).decode('utf-8');
ok(
$html.match('</html>') && $html.match($find_char),
'Got utf-8 page'
Expand Down

0 comments on commit 7d798b7

Please sign in to comment.