Opening dirhandle DIR also as a file needs no warnings 'deprecated';
[p5sagit/p5-mst-13.2.git] / t / op / repeat.t
old mode 100755 (executable)
new mode 100644 (file)
index d1b9c94..d1083e8
@@ -6,15 +6,19 @@ BEGIN {
 }
 
 require './test.pl';
-plan(tests => 33);
+plan(tests => 42);
 
 # compile time
 
 is('-' x 5, '-----',    'compile time x');
+is('-' x 3.1, '---',    'compile time 3.1');
+is('-' x 3.9, '---',    'compile time 3.9');
 is('-' x 1, '-',        '  x 1');
 is('-' x 0, '',         '  x 0');
 is('-' x -1, '',        '  x -1');
 is('-' x undef, '',     '  x undef');
+is('-' x "foo", '',     '  x "foo"');
+is('-' x "3rd", '---',  '  x "3rd"');
 
 is('ab' x 3, 'ababab',  '  more than one char');
 
@@ -22,10 +26,14 @@ is('ab' x 3, 'ababab',  '  more than one char');
 
 $a = '-';
 is($a x 5, '-----',     'run time x');
+is($a x 3.1, '---',     '  x 3.1');
+is($a x 3.9, '---',     '  x 3.9');
 is($a x 1, '-',         '  x 1');
 is($a x 0, '',          '  x 0');
 is($a x -3, '',         '  x -3');
 is($a x undef, '',      '  x undef');
+is($a x "foo", '',      '  x "foo"');
+is($a x "3rd", '---',   '  x "3rd"');
 
 $a = 'ab';
 is($a x 3, 'ababab',    '  more than one char');
@@ -144,3 +152,5 @@ is(77, scalar ((1,7)x2),    'stack truncation');
     is($y, 'abcdabcd');
 }
 
+# [perl #35885]
+is( (join ',', (qw(a b c) x 3)), 'a,b,c,a,b,c,a,b,c', 'x on qw produces list' );