[libinline-java-perl] 287/398: Rearranged PerlNatives test
Jonas Smedegaard
dr at jones.dk
Thu Feb 26 11:43:15 UTC 2015
This is an automated email from the git hooks/post-receive script.
js pushed a commit to tag 0.55
in repository libinline-java-perl.
commit ed831650eadccf80ecb97aa32744cfb91a5241b2
Author: patrick_leb <>
Date: Sat Feb 14 14:59:44 2004 +0000
Rearranged PerlNatives test
---
t/12_2_perl_natives.t | 32 ++++++++++++++++++++++----------
1 file changed, 22 insertions(+), 10 deletions(-)
diff --git a/t/12_2_perl_natives.t b/t/12_2_perl_natives.t
index ba2257f..391c2f0 100644
--- a/t/12_2_perl_natives.t
+++ b/t/12_2_perl_natives.t
@@ -1,5 +1,6 @@
use strict ;
use Test ;
+use ExtUtils::MakeMaker ;
use Inline Config =>
@@ -12,20 +13,13 @@ use Inline (
Java => 'DATA',
) ;
-BEGIN {
- print STDERR
- "\nNote: PerlNatives is still experimental and errors here can safely\n" .
- "be ignored if you don't plan on using this feature. However, the\n" .
- "author would appreciate if errors encountered here were reported\n" .
- "to the mailing list (inline\@perl.org) along with your hardware/OS\n".
- "detail. Thank you.\n" ;
-} ;
eval {
t121->init() ;
} ;
if ($@){
if ($@ =~ /Can\'t initialize PerlNatives/){
+ # Some problem initializing he feature, so we bail out...
plan(tests => 0) ;
exit ;
}
@@ -33,6 +27,25 @@ if ($@){
die($@) ;
}
}
+else{
+ print STDERR <<TXT;
+
+Note: PerlNatives is still experimental and may not function properly on
+all platforms yet. Keep in mind that errors here can safely be ignored if
+you don't plan on using this feature. However, the author would appreciate
+if errors encountered here were reported to the mailing list (inline\@perl.org)
+along with your hardware/OS detail. Thank you.
+
+TXT
+
+ my $oldfh = select STDERR ;
+ my $ans = prompt("Would you like to run the PerlNative tests?", 'n') ;
+ select $oldfh ;
+ if ($ans !~ /^y/i){
+ plan(tests => 0) ;
+ exit ;
+ }
+}
plan(tests => 5) ;
@@ -70,7 +83,6 @@ sub types {
my $sum = 0 ;
map {$sum += $_} @_ ;
return $sum ;
-
}
@@ -91,7 +103,7 @@ sub callback {
package main ;
-__END__
+__DATA__
__Java__
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libinline-java-perl.git
More information about the Pkg-perl-cvs-commits
mailing list