Permalink
Browse files

Added tests for redirect and pull of binary data

  • Loading branch information...
1 parent 21ddd62 commit 3984fc558e5ad3b14b145ddee0e62f4bef934b7a @ronaldxs ronaldxs committed Aug 10, 2012
Showing with 33 additions and 0 deletions.
  1. +16 −0 t/get-binary-camelia.t
  2. +17 −0 t/get-w3-redirect.t
View
@@ -0,0 +1,16 @@
+use v6;
+use Test;
+
+use LWP::Simple;
+
+# don't use rakudo.org anymore, it has proven to be rather unreliable :(
+my $logo = LWP::Simple.get('http://www.perl6.org/camelia-logo.png');
+
+ok(
+ $logo.bytes == 68382 && $logo[ 60_000 ] == 74,
+ 'Fetched Camelia Logo'
+);
+
+
+done;
+
View
@@ -0,0 +1,17 @@
+use v6;
+use Test;
+
+use LWP::Simple;
+
+# don't use rakudo.org anymore, it has proven to be rather unreliable :(
+my $html = LWP::Simple.get('http://jigsaw.w3.org/HTTP/300/301.html');
+
+ok(
+ $html.match('Redirect test page'),
+ 'Was redirected to w3 redirect test page'
+);
+
+#diag("Content\n" ~ $html);
+
+done;
+

0 comments on commit 3984fc5

Please sign in to comment.