]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Adjust a seq subtest not to depend on the vagaries of floating point.
authorJim Meyering <meyering@redhat.com>
Thu, 1 Nov 2007 11:10:06 +0000 (12:10 +0100)
committerJim Meyering <meyering@redhat.com>
Thu, 1 Nov 2007 11:10:06 +0000 (12:10 +0100)
* tests/misc/seq (float-3): Use 10.94 as the endpoint, not 10.95,
since 10.95 was precisely in the middle of the interval, and with
a %.1f format could map to either 10.9 or 11.0.
Reported by Mike Frysinger

ChangeLog
tests/misc/seq

index 2aece3d4027a9a26973abb71887ff9d0fc2dfca4..2344f28dde304a1880523dd9f1b8fe9de605c69d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2007-11-01  Jim Meyering  <meyering@redhat.com>
 
+       Adjust a seq subtest not to depend on the vagaries of floating point.
+       * tests/misc/seq (float-3): Use 10.94 as the endpoint, not 10.95,
+       since 10.95 was precisely in the middle of the interval, and with
+       a %.1f format could map to either 10.9 or 11.0.
+       Reported by Mike Frysinger
+
        Make the new printf-surprise test more precise.
        * tests/test-lib.sh (require_ulimit_): New function.
        * tests/misc/printf-surprise: Use ulimit -v to trigger the fixed bug,
index 8da4335dd2fb1b585601ff0cfa5a20bf37755523..1f3ec06c12ec08303f7f4ee7957b329f4c56a3fd 100755 (executable)
@@ -47,7 +47,7 @@ my @Tests =
 
    ['float-1', qw(0.8 0.1 0.9),        {OUT => [qw(0.8 0.9)]}],
    ['float-2', qw(0.1 0.99 1.99),      {OUT => [qw(0.10 1.09)]}],
-   ['float-3', qw(10.8 0.1 10.95),     {OUT => [qw(10.8 10.9)]}],
+   ['float-3', qw(10.8 0.1 10.94),     {OUT => [qw(10.8 10.9)]}],
    ['float-4', qw(0.1 -0.1 -0.2),      {OUT => [qw(0.1 0.0 -0.1 -0.2)]},
     {OUT_SUBST => 's,^-0\.0$,0.0,'},
    ],