~ubuntu-branches/ubuntu/trusty/libtest-simple-perl/trusty

« back to all changes in this revision

Viewing changes to t/subtest/threads.t

  • Committer: Package Import Robot
  • Author(s): Damyan Ivanov
  • Date: 2013-10-18 22:04:51 UTC
  • mfrom: (1.3.7)
  • Revision ID: package-import@ubuntu.com-20131018220451-gf7pmffh2zwa16er
Tags: 0.99-1
* New upstream release
* drop perl5.18.tests patch, no longer needed

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/perl -w
 
2
 
 
3
use strict;
 
4
use warnings;
 
5
 
 
6
use Config;
 
7
BEGIN {
 
8
    unless ( $] >= 5.008001 && $Config{'useithreads'} && 
 
9
             eval { require threads; 'threads'->import; 1; }) 
 
10
    {
 
11
        print "1..0 # Skip: no working threads\n";
 
12
        exit 0;
 
13
    }
 
14
}
 
15
 
 
16
use Test::More;
 
17
 
 
18
subtest 'simple test with threads on' => sub {
 
19
    is( 1+1, 2,   "simple test" );
 
20
    is( "a", "a", "another simple test" );
 
21
};
 
22
 
 
23
pass("Parent retains sharedness");
 
24
 
 
25
done_testing(2);