Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/lib/libc/stdio Rename few test case names. No function...
details: https://anonhg.NetBSD.org/src/rev/fe54e676e8f5
branches: trunk
changeset: 767249:fe54e676e8f5
user: jruoho <jruoho%NetBSD.org@localhost>
date: Wed Jul 13 11:17:03 2011 +0000
description:
Rename few test case names. No functional change.
diffstat:
tests/lib/libc/stdio/t_popen.c | 32 ++++++++++++++++++--------------
tests/lib/libc/stdio/t_printf.c | 10 +++++-----
2 files changed, 23 insertions(+), 19 deletions(-)
diffs (130 lines):
diff -r 856722d111fc -r fe54e676e8f5 tests/lib/libc/stdio/t_popen.c
--- a/tests/lib/libc/stdio/t_popen.c Wed Jul 13 11:03:07 2011 +0000
+++ b/tests/lib/libc/stdio/t_popen.c Wed Jul 13 11:17:03 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_popen.c,v 1.2 2011/06/11 18:03:18 christos Exp $ */
+/* $NetBSD: t_popen.c,v 1.3 2011/07/13 11:17:03 jruoho Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -19,7 +19,7 @@
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
@@ -36,7 +36,7 @@
#endif /* not lint */
#ifndef lint
-__RCSID("$NetBSD: t_popen.c,v 1.2 2011/06/11 18:03:18 christos Exp $");
+__RCSID("$NetBSD: t_popen.c,v 1.3 2011/07/13 11:17:03 jruoho Exp $");
#endif /* not lint */
#include <atf-c.h>
@@ -63,28 +63,30 @@
atf_tc_fail("Check stderr for error details."); \
} while ( /*CONSTCOND*/ 0 )
-ATF_TC_WITH_CLEANUP(popen);
+ATF_TC_WITH_CLEANUP(popen_zeropad);
+ATF_TC_HEAD(popen_zeropad, tc)
+{
-ATF_TC_HEAD(popen, tc)
-{
-
atf_tc_set_md_var(tc, "descr", "output format zero padding");
}
-
-ATF_TC_BODY(popen, tc)
+
+ATF_TC_BODY(popen_zeropad, tc)
{
char *buffer, command[MAXPATHLEN];
int index, in;
FILE *my_pipe;
- if ((buffer = malloc(BUFSIZE*sizeof(char))) == NULL)
+ if ((buffer = malloc(BUFSIZE)) == NULL)
atf_tc_skip("Unable to allocate buffer.");
srand ((unsigned int)time(NULL));
- for (index=0; index<BUFSIZE; index++)
+
+ for (index = 0; index < BUFSIZE; index++)
buffer[index]=(char)rand();
- (void)snprintf(command, sizeof(command), "%s >%s", _PATH_CAT, DATAFILE);
+ (void)snprintf(command, sizeof(command), "%s >%s",
+ _PATH_CAT, DATAFILE);
+
if ((my_pipe = popen(command, "w")) == NULL)
TEST_ERROR("popen write");
@@ -95,6 +97,7 @@
TEST_ERROR("pclose");
(void)snprintf(command, sizeof(command), "%s %s", _PATH_CAT, DATAFILE);
+
if ((my_pipe = popen(command, "r")) == NULL)
TEST_ERROR("popen read");
@@ -118,14 +121,15 @@
TEST_ERROR("pclose");
}
-ATF_TC_CLEANUP(popen, tc)
+ATF_TC_CLEANUP(popen_zeropad, tc)
{
(void)unlink(DATAFILE);
}
ATF_TP_ADD_TCS(tp)
{
- ATF_TP_ADD_TC(tp, popen);
+
+ ATF_TP_ADD_TC(tp, popen_zeropad);
return atf_no_error();
}
diff -r 856722d111fc -r fe54e676e8f5 tests/lib/libc/stdio/t_printf.c
--- a/tests/lib/libc/stdio/t_printf.c Wed Jul 13 11:03:07 2011 +0000
+++ b/tests/lib/libc/stdio/t_printf.c Wed Jul 13 11:17:03 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_printf.c,v 1.1 2011/07/08 06:38:04 jruoho Exp $ */
+/* $NetBSD: t_printf.c,v 1.2 2011/07/13 11:17:03 jruoho Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,15 +31,15 @@
#include <stdio.h>
#include <string.h>
-ATF_TC(sprintf_dotzero);
-ATF_TC_HEAD(sprintf_dotzero, tc)
+ATF_TC(snprintf_dotzero);
+ATF_TC_HEAD(snprintf_dotzero, tc)
{
atf_tc_set_md_var(tc, "descr", \
"PR lib/32951: %.0f formats (0.0,0.5] to \"0.\"");
}
-ATF_TC_BODY(sprintf_dotzero, tc)
+ATF_TC_BODY(snprintf_dotzero, tc)
{
char s[4];
@@ -74,7 +74,7 @@
ATF_TP_ADD_TCS(tp)
{
- ATF_TP_ADD_TC(tp, sprintf_dotzero);
+ ATF_TP_ADD_TC(tp, snprintf_dotzero);
ATF_TP_ADD_TC(tp, sprintf_zeropad);
return atf_no_error();
Home |
Main Index |
Thread Index |
Old Index