]> git.vpit.fr Git - perl/modules/VPIT-TestHelpers.git/blobdiff - t/42-threads-forced.t
Add threads feature
[perl/modules/VPIT-TestHelpers.git] / t / 42-threads-forced.t
diff --git a/t/42-threads-forced.t b/t/42-threads-forced.t
new file mode 100644 (file)
index 0000000..a3e9ec8
--- /dev/null
@@ -0,0 +1,15 @@
+#!perl -T
+
+use strict;
+use warnings;
+
+BEGIN { $ENV{PERL_FORCE_TEST_THREADS} = 1 }
+
+use VPIT::TestHelpers threads => [ 'Is::Thread::Safe', undef ];
+
+use Test::More tests => 2;
+
+$_->join for map {
+ my $id = $_;
+ spawn sub { pass "in thread $id" };
+} 1 .. 2;