|
|
Sun Nov 4 18:47:56 EET 2007 Ville Laurikari <vl@iki.fi> * Fixed a bug in \<. \< always matched at the beginning of the string. Thanks to Shmuel Zeigerman for the bug report. See http://laurikari.net/pipermail/tre-general/2007-February/000128.html diff -rN -u old-stable/lib/tre-match-utils.h new-stable/lib/tre-match-utils.h
--- old-stable/lib/tre-match-utils.h 2007-11-04 20:30:23.000000000 +0200
+++ new-stable/lib/tre-match-utils.h 2007-11-04 20:30:23.000000000 +0200
@@ -161,7 +161,7 @@
&& (next_c != L'\0' || reg_noteol) \ && (next_c != L'\n' || !reg_newline)) \ || ((assertions & ASSERT_AT_BOW) \ - && (pos > 0 && (IS_WORD_CHAR(prev_c) || !IS_WORD_CHAR(next_c)))) \
+ && (IS_WORD_CHAR(prev_c) || !IS_WORD_CHAR(next_c))) \
|| ((assertions & ASSERT_AT_EOW) \ && (!IS_WORD_CHAR(prev_c) || IS_WORD_CHAR(next_c))) \ || ((assertions & ASSERT_AT_WB) \ diff -rN -u old-stable/tests/retest.c new-stable/tests/retest.c
--- old-stable/tests/retest.c 2007-11-04 20:30:23.000000000 +0200
+++ new-stable/tests/retest.c 2007-11-04 20:30:23.000000000 +0200
@@ -1121,6 +1121,8 @@
test_exec("aax xxa", 0, REG_OK, 2, 3, END); test_comp("\\Bx\\b", REG_EXTENDED, 0); test_exec("aax xxx", 0, REG_OK, 2, 3, END); + test_comp("\\<.", REG_EXTENDED, 0);
+ test_exec(";xaa", 0, REG_OK, 1, 2, END);
/* Shorthands for character classes. */ test_comp("\\w+", REG_EXTENDED, 0);
|