File: 03destroy.t

package info (click to toggle)
libsyntax-keyword-match-perl 0.15-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 236 kB
  • sloc: perl: 902; ansic: 34; makefile: 3
file content (23 lines) | stat: -rw-r--r-- 378 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/perl

use v5.14;
use warnings;

use Test2::V0 0.000147;

use Syntax::Keyword::Match;

{
   my $arr = [];
   is_oneref( $arr, '$arr has one reference before test' );

   my $ok;
   match( $arr : == ) {
      case( $arr ) { $ok = 1 }
   }
   ok( $ok, '$arr is numerically equal to itself' );

   is_oneref( $arr, '$arr has one reference after test' );
}

done_testing;