Skip to content

Instantly share code, notes, and snippets.

@Tux
Created April 13, 2016 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Tux/eac2f0f8c380a8acfdd1ba8617de5204 to your computer and use it in GitHub Desktop.
Save Tux/eac2f0f8c380a8acfdd1ba8617de5204 to your computer and use it in GitHub Desktop.
test script
#!perl6
use v6;
use Test;
for ^32 {
say "";
say $_;
my @data = ^20 .map({ 256.rand.Int }).list;
@data.unshift: 61;
#dd @data;
my $b = Buf.new(@data);
ok((my Str $u = $b.decode("utf8-c8")), "decode");
my @back = $u.encode("utf8-c8").list;
#dd @back;
my $n = Buf.new(@back);
is-deeply($n, $b, "Data");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment