Skip to content

Instantly share code, notes, and snippets.

@rjbs
Last active August 29, 2015 14:21
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 rjbs/7aa7adfc92c68cb6217a to your computer and use it in GitHub Desktop.
Save rjbs/7aa7adfc92c68cb6217a to your computer and use it in GitHub Desktop.
{
throws-like(
sub { my $zscii = $z.zchars-to-zscii( $dict-ryche ); },
X::AdHoc,
message => /terminated early/,
"we can't normally decode a word terminated mid-sequence",
);
}
ok 1 - code dies
ok 2 - right exception type (X::AdHoc)
not ok 3 - .message matches
# Failed test '.message matches '
# at src/gen/m-CORE.setting line 10007
Code object coerced to string (please use .gist or .perl to do that) in block at lib/Test.pm:453
# Expected:
# Got: ten-bit ZSCII encoding segment terminated early
# Looks like you failed 1 tests of 3
not ok 9 - we can't normally decode a word terminated mid-sequence
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment