From 3a6bc0b36adfb7d10c0d67c2338e15c6f4d241ed Mon Sep 17 00:00:00 2001 From: Tommaso Cucinotta Date: Sun, 6 Feb 2011 22:48:54 +0000 Subject: [PATCH] More regular expression testing. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37520 a592a061-630c-0410-9148-cb99ea01b6c8 --- development/autotests/findadv-02-in.txt | 5 ++++- development/autotests/findadv-05-in.txt | 11 +++++++++- development/autotests/findadv-06-in.txt | 2 +- development/autotests/findadv-07-in.txt | 27 +++++++++++++++++++++++++ development/autotests/findadv-08-in.txt | 23 +++++++++++++++++++++ development/autotests/findadv-09-in.txt | 25 +++++++++++++++++++++++ 6 files changed, 90 insertions(+), 3 deletions(-) create mode 100644 development/autotests/findadv-07-in.txt create mode 100644 development/autotests/findadv-08-in.txt create mode 100644 development/autotests/findadv-09-in.txt diff --git a/development/autotests/findadv-02-in.txt b/development/autotests/findadv-02-in.txt index 7e1bd5f236..cbdb257903 100644 --- a/development/autotests/findadv-02-in.txt +++ b/development/autotests/findadv-02-in.txt @@ -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] diff --git a/development/autotests/findadv-05-in.txt b/development/autotests/findadv-05-in.txt index 14b02640a7..95f3730f6d 100644 --- a/development/autotests/findadv-05-in.txt +++ b/development/autotests/findadv-05-in.txt @@ -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 diff --git a/development/autotests/findadv-06-in.txt b/development/autotests/findadv-06-in.txt index d50c73f19f..df235bad72 100644 --- a/development/autotests/findadv-06-in.txt +++ b/development/autotests/findadv-06-in.txt @@ -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 diff --git a/development/autotests/findadv-07-in.txt b/development/autotests/findadv-07-in.txt new file mode 100644 index 0000000000..3e0c58fb46 --- /dev/null +++ b/development/autotests/findadv-07-in.txt @@ -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 diff --git a/development/autotests/findadv-08-in.txt b/development/autotests/findadv-08-in.txt new file mode 100644 index 0000000000..2a8bc3ba2c --- /dev/null +++ b/development/autotests/findadv-08-in.txt @@ -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 diff --git a/development/autotests/findadv-09-in.txt b/development/autotests/findadv-09-in.txt new file mode 100644 index 0000000000..555c354e21 --- /dev/null +++ b/development/autotests/findadv-09-in.txt @@ -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 -- 2.39.5