Add another case related to the ones from PR 49278: [A-\\].

This commit is contained in:
dholland 2016-10-31 05:08:53 +00:00
parent c5224ffd07
commit 5358d0befc
1 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: t_fnmatch.c,v 1.6 2014/10/12 22:33:41 christos Exp $ */
/* $NetBSD: t_fnmatch.c,v 1.7 2016/10/31 05:08:53 dholland Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__RCSID("$NetBSD: t_fnmatch.c,v 1.6 2014/10/12 22:33:41 christos Exp $");
__RCSID("$NetBSD: t_fnmatch.c,v 1.7 2016/10/31 05:08:53 dholland Exp $");
#include <atf-c.h>
#include <fnmatch.h>
@ -166,6 +166,7 @@ ATF_TC_BODY(fnmatch_initialbracket, tc)
ATF_CHECK(fnmatch("[!]a-]", "b", 0) == 0);
ATF_CHECK(fnmatch("[]-_]", "^", 0) == 0); /* range: ']', '^', '_' */
ATF_CHECK(fnmatch("[!]-_]", "X", 0) == 0);
ATF_CHECK(fnmatch("[A-\\\\]", "[", 0) == 0);
ATF_CHECK(fnmatch("[a-z]/[a-z]", "a/b", 0) == 0);
ATF_CHECK(fnmatch("[*]/b", "*/b", 0) == 0);
ATF_CHECK(fnmatch("[?]/b", "?/b", 0) == 0);