File: threads.t

package info (click to toggle)
perl 5.36.0-7%2Bdeb12u3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 120,064 kB
  • sloc: ansic: 650,199; perl: 478,052; sh: 70,710; pascal: 8,435; xml: 2,428; yacc: 1,230; makefile: 1,175; cpp: 208; lisp: 1
file content (24 lines) | stat: -rw-r--r-- 430 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/perl -w

use strict;
use warnings;

use Test2::Util qw/CAN_THREAD/;
BEGIN {
    unless(CAN_THREAD) {
        require Test::More;
        Test::More->import(skip_all => "threads are not supported");
    }
}
use threads;

use Test::More;

subtest 'simple test with threads on' => sub {
    is( 1+1, 2,   "simple test" );
    is( "a", "a", "another simple test" );
};

pass("Parent retains sharedness");

done_testing(2);