Advertisement
happy-barney

it vs ok+lives+skip

Feb 27th, 2025 (edited)
3,258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.45 KB | None | 0 0
  1. {
  2.       my $data = { q{foo} => [ q{bar}, { q{<=} => 33 } ] } ;
  3.       my $encoded = to_toml( $data );
  4.  
  5.       # `it`, when used with `got BLOCK`, also detects `lives/throws` and acts accordingly
  6.       # - when `throws` is presented, reports test failure if block lives
  7.       # - otherwise reports test failure when block died
  8.       it q (should successfully decode)
  9.           => got    { from_toml ($encoded) }
  10.           => expect => $data
  11.           ;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement