"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Basic/SourceFilter/t/niceslice.t" between
PDL-2.076.tar.gz and PDL-2.077.tar.gz

About: PDL (Perl Data Language) aims to turn perl into an efficient numerical language for scientific computing (similar to IDL and MatLab).

niceslice.t  (PDL-2.076):niceslice.t  (PDL-2.077)
skipping to change at line 107 skipping to change at line 107
ok (all $c == $pb-1); ok (all $c == $pb-1);
# empty modifier block # empty modifier block
$pa = sequence 10; $pa = sequence 10;
$pb = translate_and_run '$pa(0; )'; $pb = translate_and_run '$pa(0; )';
ok ($pb == $pa->at(0)); ok ($pb == $pa->at(0));
# modifiers repeated # modifiers repeated
$pb = translate_and_run '$pa(0;-||)', qr/twice or more/; $pb = translate_and_run '$pa(0;-||)', qr/twice or more/;
$pa = sequence(3);
translate_and_run 'my $x = 1 / 2; $pa = $pa((2)); $x =~ /\./;';
is $pa.'', '2', '/ not treated as starting a regex';
$pa = sequence(3);
translate_and_run 'my $x = (0.5 + 0.5) / 2; $pa = $pa((2)); $x =~ /\./;';
is $pa.'', '2', '/ not treated as starting a regex even after paren';
# foreach/for blocking # foreach/for blocking
$pa = ''; $pa = '';
translate_and_run "foreach \n" . ' $pb(1,2,3,4) {$pa .= $pb;}'; translate_and_run "foreach \n" . ' $pb(1,2,3,4) {$pa .= $pb;}';
is($pa, '1234'); is($pa, '1234');
$pa = ''; $pa = '';
translate_and_run 'for $pb(1,2,3,4) {$pa .= $pb;}'; translate_and_run 'for $pb(1,2,3,4) {$pa .= $pb;}';
is($pa, '1234'); is($pa, '1234');
 End of changes. 1 change blocks. 
0 lines changed or deleted 8 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)