More regular expression testing.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37520 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Tommaso Cucinotta 2011-02-06 22:48:54 +00:00
parent 252606610c
commit 3a6bc0b36a
6 changed files with 90 additions and 3 deletions

View File

@ -6,7 +6,10 @@ KK: \Cm
KK: x^(a) +\\frac 1+x^(a) \[Down]1-x^(a) \C\[Home]
KK: \CF
KK: \Cmx^(a) \[Tab]
KK: \Cmx_a \[Return]\[Return]\[Return]
KK: \Cmx_a
KD: 500
KK: \[Return]\[Return]\[Return]
KD: 60
KK: \Cs
KK: \Ax
KK: buffer-export latex\[Return]

View File

@ -2,7 +2,7 @@
#
Lang it_IT.utf8
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: foo\Ce foo\Ce foo\C\[Home]
KK: foo \Cefoo foo\Ce foo\C\[Home]
KK: \Cs
KK: \CF
# Uncheck ignore format
@ -11,3 +11,12 @@ KK: \Ce
KK: foo\[Return]
TestEnd
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 4\n with len: 3' lyx-log.txt
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \CF
# Uncheck ignore format
KK: \Az\Ag\Ae
KK: \Ce
KK: foo\[Return]\[Return]
TestEnd
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 8\n with len: 3' lyx-log.txt

View File

@ -1,4 +1,4 @@
# Basic test for searching styles
# Basic test for searching with par-style awareness
Lang it_IT.utf8
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1

View File

@ -0,0 +1,27 @@
# Basic test for searching with par-style awareness
Lang it_IT.utf8
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: foo bar\[Return]
KK: \Apb
KK: foo bar\[Return]
KK: \Aps
KK: foo bar\C\[Home]
KK: \Cs
KK: \CF
# Uncheck ignore format
KK: \Az\Ag\Ae
KK: \Apb
KK: foo\[Return]
TestEnd
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 1 pos: 0\n with len: 3' lyx-log.txt
#
TestBegin test.lyx -dbg find > lyx-log2.txt 2>&1
KK: \C\[Home]
KK: \CF
# Uncheck ignore format
KK: \Az\Ag\Ae
KK: \Apb
KK: bar\[Return]\[Return]
TestEnd
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 1 pos: 4\n with len: 3' lyx-log2.txt

View File

@ -0,0 +1,23 @@
# Basic test for searching with regular expressions
Lang it_IT.utf8
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: Nel mezzo del cammin di nostra vita\[Return]
KK: mi ritrovai per una selva oscura\C\[Home]
KK: \Cs
KK: \CF
KK: o\CR.* a\[Return]
TestEnd
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 8\n with len: 8' lyx-log.txt
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \CF
KK: o\CR[[:word:]]* a\Al\Ar\[Return]
TestEnd
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 1 pos: 26\n with len: 6' lyx-log.txt
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \CF
KK: \CR.* \Al\Ar\[Return]\[Return]\[Return]
TestEnd
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 10\n with len: 3' lyx-log.txt

View File

@ -0,0 +1,25 @@
# Test for searching with regular expressions
Lang it_IT.utf8
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \Apb
KK: one\[Return]
KK: two\[Return]
KK: three\C\[Home]
KK: \Cs
KK: \CF
# Uncheck ignore format
KK: \Az\Ag\Ae
KK: \Apb
KK: \CR[a-z]* \[Return]
TestEnd
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 0\n with len: 3' lyx-log.txt
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \CF
# Uncheck ignore format
KK: \Az\Ag\Ae
KK: \Apb
KK: \CR[a-z]* \[Return]\[Return]
TestEnd
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 1 pos: 0\n with len: 3' lyx-log.txt