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 check the results of encoding and decoding



details:   https://anonhg.NetBSD.org/src/rev/8d9804694fbe
branches:  trunk
changeset: 784847:8d9804694fbe
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Feb 11 04:12:48 2013 +0000

description:
check the results of encoding and decoding

diffstat:

 tests/lib/libc/gen/t_vis.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 2ebd06a200e3 -r 8d9804694fbe tests/lib/libc/gen/t_vis.c
--- a/tests/lib/libc/gen/t_vis.c        Mon Feb 11 02:52:32 2013 +0000
+++ b/tests/lib/libc/gen/t_vis.c        Mon Feb 11 04:12:48 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_vis.c,v 1.4 2011/11/06 03:38:16 christos Exp $       */
+/*     $NetBSD: t_vis.c,v 1.5 2013/02/11 04:12:48 christos Exp $       */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -48,7 +48,9 @@
 #endif
        VIS_HTTP1808,
        VIS_MIMESTYLE,
+#if 0  /* Not supported by vis(3) */
        VIS_HTTP1866,
+#endif
 };
 
 #define SIZE   256
@@ -73,8 +75,8 @@
                srcbuf[i] = (char)i;
 
        for (i = 0; i < __arraycount(styles); i++) {
-               strsvisx(visbuf, srcbuf, SIZE, styles[i], "");
-               strunvisx(dstbuf, visbuf, styles[i]);
+               ATF_REQUIRE(strsvisx(visbuf, srcbuf, SIZE, styles[i], "") > 0);
+               ATF_REQUIRE(strunvisx(dstbuf, visbuf, styles[i]) > 0);
                for (j = 0; j < SIZE; j++)
                        if (dstbuf[j] != (char)j)
                                atf_tc_fail_nonfatal("Failed for style %x, "



Home | Main Index | Thread Index | Old Index