forked from cosimo/perl6-lwp-simple
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix and test for case with no content length or chunking
- Loading branch information
Showing
2 changed files
with
31 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
use v6; | ||
use Test; | ||
|
||
use LWP::Simple; | ||
|
||
# this page is, for now, delivered by a server that does not provide | ||
# a content length or do chunking | ||
my $html = LWP::Simple.get('http://www.rosettacode.org/wiki/Rosetta_Code'); | ||
|
||
ok( | ||
$html.match('About Rosetta Code') && | ||
$html.match('</html>') && $html.chars > 12_000, | ||
'make sure we pulled down whole document for some substantial size' | ||
); | ||
|
||
done; |