Skip to content

Commit

Permalink
make latin1 test encoding test
Browse files Browse the repository at this point in the history
  • Loading branch information
ronaldxs committed Aug 13, 2012
1 parent ddf996e commit 398b102
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 17 deletions.
23 changes: 23 additions & 0 deletions t/get-w3-latin1-utf8.t
@@ -0,0 +1,23 @@
use v6;
use Test;

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');
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-8.html');
$find_char = Buf.new(0xC3, 0xA9).decode('utf-8');
ok(
$html.match('</html>') && $html.match($find_char),
'Got utf-8 page'
);
#diag("Content\n" ~ $html);

done;

17 changes: 0 additions & 17 deletions t/get-w3-latin1.t

This file was deleted.

0 comments on commit 398b102

Please sign in to comment.