diff options
Diffstat (limited to 'gnu/usr.bin/perl/dist/Math-Complex/t/underbar.t')
-rw-r--r-- | gnu/usr.bin/perl/dist/Math-Complex/t/underbar.t | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/gnu/usr.bin/perl/dist/Math-Complex/t/underbar.t b/gnu/usr.bin/perl/dist/Math-Complex/t/underbar.t new file mode 100644 index 00000000000..809e8805a05 --- /dev/null +++ b/gnu/usr.bin/perl/dist/Math-Complex/t/underbar.t @@ -0,0 +1,28 @@ +# +# Tests that the standard Perl 5 functions that we override +# that operate on the $_ will work correctly [perl #62412] +# + +use Test::More; + +use strict; +use warnings; + +my @f = qw(abs cos exp log sin sqrt); + +plan tests => scalar @f; + +use Math::Complex; + +my %CORE; + +for my $f (@f) { + local $_ = 0.5; + $CORE{$f} = eval "CORE::$f"; +} + +for my $f (@f) { + local $_ = 0.5; + is(eval "Math::Complex::$f", $CORE{$f}, $f); +} + |