The branch, 2.0.x, has been updated. - Log -----------------------------------------------------------------
commit 35a7f81654662cb9254c23d608abd5b410578462 Author: Tommaso Cucinotta <[email protected]> Date: Sun Dec 9 20:20:05 2012 +0000 Fixing behavior of Lang directive in test cases, by setting LANGUAGE variable, in addition to LANG one. diff --git a/development/autotests/keytest.py b/development/autotests/keytest.py index 1753f14..a72ea11 100755 --- a/development/autotests/keytest.py +++ b/development/autotests/keytest.py @@ -401,6 +401,10 @@ while not failed: ccode = lang[0:idx] else: ccode = lang + + print "Setting LANGUAGE=" + ccode + "\n" + os.environ['LANGUAGE'] = ccode + idx = lang.find("_") if idx != -1: short_code = lang[0:idx] commit 927496ecd09ef8deb295a83d86f744805c3d1cde Author: Tommaso Cucinotta <[email protected]> Date: Mon Oct 22 01:03:44 2012 +0100 Fixed bug in escape sequence, showing up with ignore format off (addressing #8380). diff --git a/development/autotests/findadv-re-04-in.txt b/development/autotests/findadv-re-04-in.txt new file mode 100644 index 0000000..06481b1 --- /dev/null +++ b/development/autotests/findadv-re-04-in.txt @@ -0,0 +1,12 @@ +# Finding styles with regexp + +Lang it_IT.utf8 +TestBegin test.lyx -dbg find > lyx-log.txt 2>&1 +KK: Hello \CeHello\C\[Home] +KK: \Cs +KK: \CF +# Uncheck ignore format (depends on IT language) +KK: \Az\Ag\Ae +KK: \Ce\Axregexp-mode\[Return].*\[Return] +TestEnd +Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 6\n with len: 5' lyx-log.txt diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp index f2c941b..50a2a57 100644 --- a/src/lyxfind.cpp +++ b/src/lyxfind.cpp @@ -492,19 +492,20 @@ Escapes const & get_regexp_escapes() { static Escapes escape_map; if (escape_map.empty()) { - escape_map.push_back(pair<string, string>("$", "\\$")); - escape_map.push_back(pair<string, string>("{", "\\{")); - escape_map.push_back(pair<string, string>("}", "\\}")); - escape_map.push_back(pair<string, string>("[", "\\[")); - escape_map.push_back(pair<string, string>("]", "\\]")); - escape_map.push_back(pair<string, string>("(", "\\(")); - escape_map.push_back(pair<string, string>(")", "\\)")); - escape_map.push_back(pair<string, string>("+", "\\+")); - escape_map.push_back(pair<string, string>("*", "\\*")); - escape_map.push_back(pair<string, string>(".", "\\.")); + escape_map.push_back(pair<string, string>("$", "_x_$")); + escape_map.push_back(pair<string, string>("{", "_x_{")); + escape_map.push_back(pair<string, string>("}", "_x_}")); + escape_map.push_back(pair<string, string>("[", "_x_[")); + escape_map.push_back(pair<string, string>("]", "_x_]")); + escape_map.push_back(pair<string, string>("(", "_x_(")); + escape_map.push_back(pair<string, string>(")", "_x_)")); + escape_map.push_back(pair<string, string>("+", "_x_+")); + escape_map.push_back(pair<string, string>("*", "_x_*")); + escape_map.push_back(pair<string, string>(".", "_x_.")); escape_map.push_back(pair<string, string>("\\", "(?:\\\\|\\\\backslash)")); escape_map.push_back(pair<string, string>("~", "(?:\\\\textasciitilde|\\\\sim)")); escape_map.push_back(pair<string, string>("^", "(?:\\^|\\\\textasciicircum\\{\\}|\\\\mathcircumflex)")); + escape_map.push_back(pair<string, string>("_x_", "\\")); } return escape_map; } ----------------------------------------------------------------------- Summary of changes: development/autotests/findadv-re-04-in.txt | 12 ++++++++++++ development/autotests/keytest.py | 4 ++++ src/lyxfind.cpp | 21 +++++++++++---------- 3 files changed, 27 insertions(+), 10 deletions(-) create mode 100644 development/autotests/findadv-re-04-in.txt hooks/post-receive -- The LyX Source Repository
