From: Paul Eggert Date: Wed, 8 Jul 2020 06:48:53 +0000 (-0700) Subject: factor: simplify tests by assuming libgmp X-Git-Tag: v9.0~221 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=712855a77d76627e54da5c10eefffd8f59f9680c;p=thirdparty%2Fcoreutils.git factor: simplify tests by assuming libgmp * tests/misc/factor.pl: Test bignums even if !HAVE_GMP. --- diff --git a/tests/misc/factor.pl b/tests/misc/factor.pl index 7bbef8a359..ecd2ab293e 100755 --- a/tests/misc/factor.pl +++ b/tests/misc/factor.pl @@ -80,17 +80,14 @@ my @Tests = {OUT => '15601 26449 111427 4830277'}], ['bug-2016-c', '12847291069740315094892340035', {OUT => '5 4073 18899 522591721 63874247821'}], + ['bug-gmp-2_sup_128', '340282366920938463463374607431768211456', + {OUT => '2 'x127 . '2'}], + ['bug-gmp-2_sup_256', + '115792089237316195423570985008687907853' + . '269984665640564039457584007913129639936', + {OUT => '2 'x255 . '2'}], ); -# If we have GMP support, append tests to exercise it. -(system "grep '^#define HAVE_GMP 1' $ENV{CONFIG_HEADER} > /dev/null") == 0 - and push (@Tests, - ['bug-gmp-2_sup_128', '340282366920938463463374607431768211456', - {OUT => '2 'x127 . '2'}], - ['bug-gmp-2_sup_256', - '115792089237316195423570985008687907853' - . '269984665640564039457584007913129639936', - {OUT => '2 'x255 . '2'}]); # Prepend the command line argument and append a newline to end # of each expected 'OUT' string.