diff options
author | Jim Meyering <meyering@redhat.com> | 2012-09-04 18:26:25 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2012-09-07 11:04:41 +0200 |
commit | 65672bf109a22748114bc3283aa499612c61a8c3 (patch) | |
tree | bc7284e5430ecb85c2754bd60ff98b2f71de88f7 | |
parent | 6c13e72c797771b4a37ffbea3e03f60b57f33a68 (diff) | |
download | coreutils-65672bf109a22748114bc3283aa499612c61a8c3.tar.xz |
factor: NEWS and tests
* NEWS (Bug fixes): Mention it.
* tests/misc/factor.pl: Add five of Torbjörn's tests.
-rw-r--r-- | NEWS | 6 | ||||
-rwxr-xr-x | tests/misc/factor.pl | 5 |
2 files changed, 11 insertions, 0 deletions
@@ -15,6 +15,12 @@ GNU coreutils NEWS -*- outline -*- it detects this precise type of cycle, diagnoses it as such and eventually exits nonzero. + factor (when using gmp) would mistakenly declare some composite numbers + to be prime, e.g., 465658903, 2242724851, 6635692801 and many more. + The fix makes factor somewhat slower (~25%) for ranges of consecutive + numbers, and up to 8 times slower for some worst-case individual numbers. + [bug introduced in coreutils-7.0, with GNU MP support] + rm -i -d now prompts the user then removes an empty directory, rather than ignoring the -d option and failing with an 'Is a directory' error. [bug introduced in coreutils-8.19, with the addition of --dir (-d)] diff --git a/tests/misc/factor.pl b/tests/misc/factor.pl index 47f934309..38a503714 100755 --- a/tests/misc/factor.pl +++ b/tests/misc/factor.pl @@ -67,6 +67,11 @@ my @Tests = {OUT => "4: 2 2\n"}, {ERR => "$prog: 'a' is not a valid positive integer\n"}, {EXIT => 1}], + ['bug-2012-a', '465658903', {OUT => '15259 30517'}], + ['bug-2012-b', '2242724851', {OUT => '33487 66973'}], + ['bug-2012-c', '6635692801', {OUT => '57601 115201'}], + ['bug-2012-d', '17709149503', {OUT => '94099 188197'}], + ['bug-2012-e', '17754345703', {OUT => '94219 188437'}], ); # Prepend the command line argument and append a newline to end |