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 tests/stdio: normalize whitespace
details: https://anonhg.NetBSD.org/src/rev/835bceb323d9
branches: trunk
changeset: 1023504:835bceb323d9
user: rillig <rillig%NetBSD.org@localhost>
date: Sat Sep 11 18:18:28 2021 +0000
description:
tests/stdio: normalize whitespace
diffstat:
tests/lib/libc/stdio/h_intr.c | 10 +++++-----
tests/lib/libc/stdio/t_fmemopen.c | 12 ++++++------
tests/lib/libc/stdio/t_open_memstream.c | 6 +++---
tests/lib/libc/stdio/t_scanf.c | 14 +++++++-------
4 files changed, 21 insertions(+), 21 deletions(-)
diffs (156 lines):
diff -r e7b6d5f69ed8 -r 835bceb323d9 tests/lib/libc/stdio/h_intr.c
--- a/tests/lib/libc/stdio/h_intr.c Sat Sep 11 16:58:38 2021 +0000
+++ b/tests/lib/libc/stdio/h_intr.c Sat Sep 11 18:18:28 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: h_intr.c,v 1.5 2021/07/10 07:50:20 christos Exp $ */
+/* $NetBSD: h_intr.c,v 1.6 2021/09/11 18:18:28 rillig Exp $ */
/**
* Test of interrupted I/O to popen()ed commands.
@@ -15,7 +15,7 @@
*
* Check program:
* find /mnt -type f -exec ./h_intr -b 512 -c run.sh {} +
- *
+ *
* ./run.sh:
#!/bin/sh
set -eu
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: h_intr.c,v 1.5 2021/07/10 07:50:20 christos Exp $");
+__RCSID("$NetBSD: h_intr.c,v 1.6 2021/09/11 18:18:28 rillig Exp $");
#include <time.h>
#include <err.h>
@@ -355,13 +355,13 @@
static void
alarmtimer(int wait)
-{
+{
struct itimerval itv;
itv.it_value.tv_sec = wait / MS;
itv.it_value.tv_usec = (wait - itv.it_value.tv_sec * MS) * MS;
itv.it_interval = itv.it_value;
- setitimer(ITIMER_REAL, &itv, NULL);
+ setitimer(ITIMER_REAL, &itv, NULL);
}
static void
diff -r e7b6d5f69ed8 -r 835bceb323d9 tests/lib/libc/stdio/t_fmemopen.c
--- a/tests/lib/libc/stdio/t_fmemopen.c Sat Sep 11 16:58:38 2021 +0000
+++ b/tests/lib/libc/stdio/t_fmemopen.c Sat Sep 11 18:18:28 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_fmemopen.c,v 1.6 2021/07/10 13:22:01 martin Exp $ */
+/* $NetBSD: t_fmemopen.c,v 1.7 2021/09/11 18:18:28 rillig Exp $ */
/*-
* Copyright (c)2010 Takehiko NOZAKI,
@@ -65,7 +65,7 @@
const char *mode_r[] = { "r", "rb", "r+", "rb+", "r+b", NULL };
const char *mode_w[] = { "w", "wb", "w+", "wb+", "w+b", NULL };
-const char *mode_a[] = { "a", "ab", "a+", "ab+", "a+b", NULL };
+const char *mode_a[] = { "a", "ab", "a+", "ab+", "a+b", NULL };
struct testcase {
const char *s;
@@ -179,7 +179,7 @@
ATF_TC(test02);
ATF_TC_HEAD(test02, tc)
{
- atf_tc_set_md_var(tc, "descr", "test02");
+ atf_tc_set_md_var(tc, "descr", "test02");
}
ATF_TC_BODY(test02, tc)
{
@@ -215,14 +215,14 @@
ATF_TC(test03);
ATF_TC_HEAD(test03, tc)
{
- atf_tc_set_md_var(tc, "descr", "test03");
+ atf_tc_set_md_var(tc, "descr", "test03");
}
ATF_TC_BODY(test03, tc)
{
const char **p;
char buf[BUFSIZ];
FILE *fp;
-
+
for (p = &mode_w[0]; *p != NULL; ++p) {
memset(&buf[0], 0x1, sizeof(buf));
@@ -359,7 +359,7 @@
/*
* Because this feature is only useful when the stream is opened for updating
* (because there is no way to get a pointer to the buffer) the fmemopen()
- * call may fail if the mode argument does not include a '+' .
+ * call may fail if the mode argument does not include a '+'.
*/
errno = 0;
fp = fmemopen(NULL, 1, *p);
diff -r e7b6d5f69ed8 -r 835bceb323d9 tests/lib/libc/stdio/t_open_memstream.c
--- a/tests/lib/libc/stdio/t_open_memstream.c Sat Sep 11 16:58:38 2021 +0000
+++ b/tests/lib/libc/stdio/t_open_memstream.c Sat Sep 11 18:18:28 2021 +0000
@@ -16,7 +16,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_open_memstream.c,v 1.2 2014/10/19 11:17:43 justin Exp $");
+__RCSID("$NetBSD: t_open_memstream.c,v 1.3 2021/09/11 18:18:28 rillig Exp $");
#include <atf-c.h>
#include <err.h>
@@ -90,7 +90,7 @@
ATF_TP_ADD_TCS(tp)
{
- ATF_TP_ADD_TC(tp, test_open_memstream);
+ ATF_TP_ADD_TC(tp, test_open_memstream);
- return atf_no_error();
+ return atf_no_error();
}
diff -r e7b6d5f69ed8 -r 835bceb323d9 tests/lib/libc/stdio/t_scanf.c
--- a/tests/lib/libc/stdio/t_scanf.c Sat Sep 11 16:58:38 2021 +0000
+++ b/tests/lib/libc/stdio/t_scanf.c Sat Sep 11 18:18:28 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_scanf.c,v 1.3 2012/03/18 07:00:51 jruoho Exp $ */
+/* $NetBSD: t_scanf.c,v 1.4 2021/09/11 18:18:28 rillig Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -43,12 +43,12 @@
ATF_TC_BODY(sscanf_neghex, tc)
{
- int i;
+ int i;
- sscanf(STRNUM, "%i", &i);
+ sscanf(STRNUM, "%i", &i);
ATF_REQUIRE(i == NUM);
- sscanf(STRNUM, "%x", &i);
+ sscanf(STRNUM, "%x", &i);
ATF_REQUIRE(i == NUM);
}
@@ -64,9 +64,9 @@
const char str[] = "\f\n\r\t\v%z";
char c;
- /* set of "white space" symbols from isspace(3) */
- c = 0;
- (void)sscanf(str, "%%%c", &c);
+ /* set of "white space" symbols from isspace(3) */
+ c = 0;
+ (void)sscanf(str, "%%%c", &c);
ATF_REQUIRE(c == 'z');
}
Home |
Main Index |
Thread Index |
Old Index