This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
t/op/threads.t: tests for RT #36664
authorDan Collins <dcollinsn@gmail.com>
Fri, 8 Jul 2016 02:56:38 +0000 (22:56 -0400)
committerYves Orton <demerphq@gmail.com>
Fri, 21 Oct 2016 07:09:44 +0000 (09:09 +0200)
t/op/threads.t

index 3a7c7ca..298db20 100644 (file)
@@ -9,7 +9,7 @@ BEGIN {
      skip_all_without_config('useithreads');
      skip_all_if_miniperl("no dynamic loading on miniperl, no threads");
 
-     plan(28);
+     plan(29);
 }
 
 use strict;
@@ -405,4 +405,16 @@ my @a = 1;
 threads->create(sub { $#a = 1; $a[1] = 2; print qq/ok\n/ })->join;
 CODE
 
+fresh_perl_is(<<'CODE', '3.5,3.5', {}, 'RT #36664: Strange behavior of shared array');
+use threads;
+use threads::shared;
+
+our @List : shared = (1..5);
+my $v = 3.5;
+$v > 0;
+$List[3] = $v;
+printf "%s,%s", @List[(3)], $List[3];
+CODE
+
+
 # EOF