Module Name:    src
Committed By:   christos
Date:           Mon Feb 11 04:12:49 UTC 2013

Modified Files:
        src/tests/lib/libc/gen: t_vis.c

Log Message:
check the results of encoding and decoding


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libc/gen/t_vis.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/lib/libc/gen/t_vis.c
diff -u src/tests/lib/libc/gen/t_vis.c:1.4 src/tests/lib/libc/gen/t_vis.c:1.5
--- src/tests/lib/libc/gen/t_vis.c:1.4	Sat Nov  5 23:38:16 2011
+++ src/tests/lib/libc/gen/t_vis.c	Sun Feb 10 23:12:48 2013
@@ -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 @@ static int styles[] = {
 #endif
 	VIS_HTTP1808,
 	VIS_MIMESTYLE,
+#if 0	/* Not supported by vis(3) */
 	VIS_HTTP1866,
+#endif
 };
 
 #define SIZE	256
@@ -73,8 +75,8 @@ ATF_TC_BODY(strvis_basic, tc)
 		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, "

Reply via email to