Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/lib/libc/gen Correct a couple of broken test cases:



details:   https://anonhg.NetBSD.org/src/rev/4cbe4a45a876
branches:  trunk
changeset: 357993:4cbe4a45a876
user:      kre <kre%NetBSD.org@localhost>
date:      Thu Dec 07 09:37:33 2017 +0000

description:
Correct a couple of broken test cases:
        "%d"  does not take the same args as "%d %s"
        "%%"  does not take the same args as "%llx"
How did these ever survive any kind of even basic sanity check?

diffstat:

 tests/lib/libc/gen/t_fmtcheck.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (25 lines):

diff -r 1110c65137e3 -r 4cbe4a45a876 tests/lib/libc/gen/t_fmtcheck.c
--- a/tests/lib/libc/gen/t_fmtcheck.c   Thu Dec 07 03:25:51 2017 +0000
+++ b/tests/lib/libc/gen/t_fmtcheck.c   Thu Dec 07 09:37:33 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_fmtcheck.c,v 1.3 2014/06/14 08:19:02 apb Exp $       */
+/*     $NetBSD: t_fmtcheck.c,v 1.4 2017/12/07 09:37:33 kre Exp $       */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -65,13 +65,13 @@
        { "%-3", "%d", 2 },
        { "%d %s", "%d", 2 },
        { "%*.*.*d", "%*.*.*d", 2 },
-       { "%d", "%d %s", 1 },
+       { "%d", "%d %s", 2 },
        { "%40s", "%20s", 1 },
        { "%x %x %x", "%o %u %d", 1 },
        { "%o %u %d", "%x %x %X", 1 },
        { "%#o %u %#-d", "%x %#x %X", 1 },
        { "%qd", "%llx", 1 },
-       { "%%", "%llx", 1 },
+       { "%%", "%llx", 2 },
        { "%ld %30s %#llx %-10.*e", "This number %lu%% and string %s has %qd numbers and %.*g floats", 1 },
        { "%o", "%lx", 2 },
        { "%p", "%lu", 2 },



Home | Main Index | Thread Index | Old Index