summaryrefslogtreecommitdiffstats
path: root/contrib/netbsd-tests/lib/libc/regex/t_regex_att.c
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2017-03-07 01:52:56 +0000
committerngie <ngie@FreeBSD.org>2017-03-07 01:52:56 +0000
commit10b87d8ba3ff12dbc34b3c1d99e89f4383fc98c3 (patch)
tree9c82bf5ded885bafb240ccc56f48e06efbf594be /contrib/netbsd-tests/lib/libc/regex/t_regex_att.c
parent6a26a03ab521df8ace37d7a8ab9af6479c2959c6 (diff)
downloadFreeBSD-src-10b87d8ba3ff12dbc34b3c1d99e89f4383fc98c3.zip
FreeBSD-src-10b87d8ba3ff12dbc34b3c1d99e89f4383fc98c3.tar.gz
MFC r313439,r314450:
r313439: Merge content from ^/projects/netbsd-tests-upstream-01-2017 into ^/head The primary end-goal of this drop is ease future merges with NetBSD and collaborate further with the NetBSD project. The goal was (largely, not completely as some items are still oustanding in the NetBSD GNATS system) achieved by doing the following: - Pushing as many changes required to port contrib/netbsd-tests back to NetBSD as possible, then pull the upstream applied changes back in to FreeBSD. - Diff reduce with upstream where possible by: -- Improving libnetbsd header, etc compat glue. -- Using _SED variables to modify test scripts on the fly for items that could not be upstreamed to NetBSD. As a bonus for this work, this change also introduces testcases for uniq(1). Many thanks to Christos for working with me to get many of the changes back into the NetBSD project. In collaboration with: Christos Zoulas <christos@netbsd.org> r314450: Add additional __FreeBSD_version guards around the hsearch_r testcases The reasoning for this is the same as r276046: to ease MFCing the tests to ^/stable/10 . This was accidentally missed in r313439
Diffstat (limited to 'contrib/netbsd-tests/lib/libc/regex/t_regex_att.c')
-rw-r--r--contrib/netbsd-tests/lib/libc/regex/t_regex_att.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/contrib/netbsd-tests/lib/libc/regex/t_regex_att.c b/contrib/netbsd-tests/lib/libc/regex/t_regex_att.c
index 0ca44b4..dd5b818 100644
--- a/contrib/netbsd-tests/lib/libc/regex/t_regex_att.c
+++ b/contrib/netbsd-tests/lib/libc/regex/t_regex_att.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_regex_att.c,v 1.1 2012/08/24 20:24:40 jmmv Exp $ */
+/* $NetBSD: t_regex_att.c,v 1.3 2017/01/14 20:59:23 christos Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -37,20 +37,18 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_regex_att.c,v 1.1 2012/08/24 20:24:40 jmmv Exp $");
+__RCSID("$NetBSD: t_regex_att.c,v 1.3 2017/01/14 20:59:23 christos Exp $");
#include <sys/param.h>
-#include <stdio.h>
+#include <atf-c.h>
+#include <ctype.h>
#include <regex.h>
-#include <string.h>
+#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
+#include <util.h>
#include <vis.h>
-#include <ctype.h>
-#include <atf-c.h>
-#ifdef __FreeBSD__
-#include <libutil.h>
-#endif
static const char sep[] = "\r\n\t";
static const char delim[3] = "\\\\\0";
@@ -377,11 +375,7 @@ checkmatches(const char *matches, size_t nm, const regmatch_t *pm,
" cur=%d, max=%zu", res, l, len - off);
off += l;
}
-#ifdef __FreeBSD__
ATF_CHECK_STREQ_MSG(res, matches, " at line %zu", lineno);
-#else
- ATF_REQUIRE_STREQ_MSG(res, matches, " at line %zu", lineno);
-#endif
free(res);
}
@@ -580,9 +574,6 @@ ATF_TC_BODY(leftassoc, tc)
* any explation. Mark as broken here, but I don't know why. */
atf_tc_expect_fail("Reason for breakage unknown");
#endif
-#ifdef __FreeBSD__
- atf_tc_expect_fail("The expected and matched groups are mismatched on FreeBSD");
-#endif
att_test(tc, "leftassoc");
}
OpenPOWER on IntegriCloud