Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DELTA] * Fix CPAN RT #140470. The pragmas ignored user-specified backend libraries. Add tests to verify the fix. * Add missing documentation.
- Loading branch information
Showing
17 changed files
with
348 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/bin/bash -u | ||
|
||
modules=( | ||
bigint | ||
bignum | ||
bigrat | ||
) | ||
|
||
backends=( | ||
#FastCalc | ||
GMP | ||
Pari | ||
#GMPz | ||
#BitVect | ||
#LTM | ||
) | ||
|
||
dirname=$( dirname -- "$0" ) || exit | ||
cd "$dirname" || exit | ||
|
||
gitroot=$( git rev-parse --show-toplevel ) || exit | ||
cd "$gitroot" || exit | ||
|
||
for backend in ${backends[@]}; do | ||
for module in ${modules[@]}; do | ||
file=t/backend-${backend,,}-$module.t | ||
cat <<EOF >$file | ||
# -*- mode: perl; -*- | ||
use strict; | ||
use warnings; | ||
use Test::More; | ||
BEGIN { | ||
eval { require Math::BigInt::$backend; }; | ||
if (\$@) { | ||
plan skip_all => "Math::BigInt::$backend not installed"; | ||
} else { | ||
plan tests => "1"; | ||
} | ||
} | ||
use $module only => "$backend"; | ||
my \$x = 1; | ||
is(\$x -> config("lib"), "Math::BigInt::$backend", | ||
"backend is Math::BigInt::$backend"); | ||
EOF | ||
echo "Wrote '$file'" | ||
done | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.