lyx_mirror/development/autotests/findadv-re-02-in.txt
Tommaso Cucinotta a48baee56f Now Adv. F&R correctly interprets escape sequences within regexp insets, e.g., \\ or \(, for finding characters with a special meaning in regular expression context (\^()[]).
Added corresponding regression tests findadv-re-01 and -02 for finding these special characters.
Unfortunately, braces {} are a little bit special and don't work yet. Added findadv-re-03 regression test to not forget about this case.
This goes along the line of fixing issues reported by Andrew Parsloe and summarised as #7638.
Last note: Still there will be cases when the Advanced F&R won't work, especially if the text to be found and/or the search pattern is preceded by backslashes or others.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39135 a592a061-630c-0410-9148-cb99ea01b6c8
2011-06-19 16:41:23 +00:00

53 lines
1.5 KiB
Plaintext

# Finding special latex/regexp chars: \
#
Lang it_IT.utf8
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \\()[]{}%^#@?*.\C\[Home]
KK: \Cs
KK: \CF
KK: \Axregexp-mode\[Return]\\\\\[Return]
TestEnd
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 0\n with len: 1' lyx-log.txt
#
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \CF
# Uncheck ignore format
KK: \Az\Ag\Ae
KK: \Axregexp-mode\[Return]\\\\\[Return]
TestEnd
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 0\n with len: 1' lyx-log.txt
# Finding special latex/regexp chars: %
#
Lang it_IT.utf8
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \CF
KK: \Axregexp-mode\[Return]%\[Return]
TestEnd
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 7\n with len: 1' lyx-log.txt
#
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \CF
# Uncheck ignore format
KK: \Az\Ag\Ae
KK: \Axregexp-mode\[Return]%\[Return]
TestEnd
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 7\n with len: 1' lyx-log.txt
# Finding special latex/regexp chars: ^
#
Lang it_IT.utf8
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \CF
KK: \Axregexp-mode\[Return]\\^\[Return]
TestEnd
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 8\n with len: 1' lyx-log.txt
#
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \CF
# Uncheck ignore format
KK: \Az\Ag\Ae
KK: \Axregexp-mode\[Return]\\^\[Return]
TestEnd
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 8\n with len: 1' lyx-log.txt