/* Test for UTF-8 regular expression optimizations.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
#include <sys/types.h>
#include <mcheck.h>
{BRE, "x.\\?z", "ax\xc3\x84\xc3\x96z", -1, 1},
{BRE, "x.\\?z", "ax\xe2\x80\x94\xc3\xa4z", -1, 1},
{BRE, "x.\\?z", "ax\xf0\x9d\x80\x80yz", -1, 1},
- {BRE, "x.\\?z", "ax\xf9\x81\x82\x83\x84\xf0\xf9\x80\x81z", -1, 1},
+ {BRE, "x.\\?z", "ax\xf9\x81\x82\x83\x84\xf0\x9d\x80\x81z", -1, 1},
{BRE, "x.\\?z", "ax\xfd\xbf\xbf\xbf\xbf\xbf\xc3\x96z", -1, 1},
{BRE, "x.\\+z", "\xe2\x80\x94xz", -1, 1},
{BRE, "x.\\+z", "\xe2\x80\x94xyz", 3, 1},
{ERE, "x.?z", "ax\xc3\x84\xc3\x96z", -1, 1},
{ERE, "x.?z", "ax\xe2\x80\x94\xc3\xa4z", -1, 1},
{ERE, "x.?z", "ax\xf0\x9d\x80\x80yz", -1, 1},
- {ERE, "x.?z", "ax\xf9\x81\x82\x83\x84\xf0\xf9\x80\x81z", -1, 1},
+ {ERE, "x.?z", "ax\xf9\x81\x82\x83\x84\xf0\x9d\x80\x81z", -1, 1},
{ERE, "x.?z", "ax\xfd\xbf\xbf\xbf\xbf\xbf\xc3\x96z", -1, 1},
{ERE, "x.+z", "\xe2\x80\x94xz", -1, 1},
{ERE, "x.+z", "\xe2\x80\x94xyz", 3, 1},
continue;
}
- /* XXX: This causes regex segfault. Disable for now.
res = re_search (®buf, tests[i].string, str_len, str_len, -str_len,
NULL);
if (res != tests[i].res)
ret = 1;
regfree (®buf);
continue;
- } */
+ }
regfree (®buf);
}