10 skip 'because tests hang on Win32 (bug #81159)', 1 if $^O =~ /^(MS)?Win32$/;
12 ok my $R = Statistics::R->new(bin => '/foo/ba/R');
14 $R->run( qq`print("Hello");` );
16 #diag "Diagnostic: \n".$@."\n";
17 ok $@, 'Executable not found';
19 ok $R = Statistics::R->new();
20 is $R->run(q`a <- 1;`), '';
23 $R->run( qq`print("Hello");\nprint(ASDF)` );
25 #diag "Diagnostic: \n".$@."\n";
26 ok $@, 'Runtime error';
28 is $R->run(q`a <- 1;`), '';
30 ok $R = Statistics::R->new();
32 $R->run( qq`print("Hello");\nprint "ASDF"` );
34 #diag "Diagnostic: \n".$@."\n";
35 ok $@, 'Syntax error';
36 # Actual error message varies depending on locale
38 is $R->run(q`a <- 1;`), '';
40 use_ok 't::FlawedStatisticsR';
41 ok $R = t::FlawedStatisticsR->new();
43 $R->run( qq`print("Hello");\ncolors<-c("red")` );
45 #diag "Diagnostic: \n".$@."\n";
46 ok $@, 'Internal error';