note
blackzero
<p>cpan>look Statistics::R</p>
<p>Returned this:</p>
<code>
# Testing Statistics::R 0.30, Perl 5.014003, /usr/bin/perl
# Failed test 'Internal error'
# at t/08-errors.t line 40.
(in cleanup) Error stopping R: 256
# Looks like you failed 1 test of 10.
Failed 1/9 test programs. 1/10195 subtests failed.
make: ** [test_dynamic] Erro 1
</code>
<p>This is the code in 08-errors.t</p>
<code>
#! perl
use strict;
use warnings;
use Test::More;
use Statistics::R;
SKIP: {
skip 'because tests hang on Win32 (bug #81159)', 1 if $^O =~ /^(MS)?Win32$/;
ok my $R = Statistics::R->new();
is $R->run(q`a <- 1;`), '';
eval {
$R->run( qq`print("Hello");\nprint(ASDF)` );
};
#diag "Diagnostic: \n".$@."\n";
ok $@, 'Runtime error';
is $R->run(q`a <- 1;`), '';
ok $R = Statistics::R->new();
eval {
$R->run( qq`print("Hello");\nprint "ASDF"` );
};
#diag "Diagnostic: \n".$@."\n";
ok $@, 'Syntax error';
# Actual error message varies depending on locale
is $R->run(q`a <- 1;`), '';
use_ok 't::FlawedStatisticsR';
ok $R = t::FlawedStatisticsR->new();
eval {
$R->run( qq`print("Hello");\ncolors<-c("red")` );
};
#diag "Diagnostic: \n".$@."\n";
ok $@, 'Internal error'; # THIS IS LINE 40 !!!
};
done_testing;
</code>
1009021
1009105