keytests: Rewritten to use searchPatterns.pl instead of pcregrep

Also corrected output of keytest.py. Messages from called
programs were output to stdout wile own printed messages
were still cached.
This commit is contained in:
Kornel Benko 2017-05-17 12:12:55 +02:00
parent 25e3c00838
commit 09e5acba11
15 changed files with 177 additions and 137 deletions

View File

@ -1,22 +1,28 @@
# #
Lang it_IT.utf8 Lang it_IT.utf8
TestBegin test.lyx -dbg key,find > findadv-03.loga.txt 2>&1 TestBegin test.lyx -dbg key,find > findadv-03.loga.txt 2>&1
CO: findadv-03.ctrl
CN: Part 1
KK: \Cm KK: \Cm
KK: x^2 -x^2\C\[Home] KK: x^2 -x^2\C\[Home]
KK: \Cs KK: \Cs
KK: \CF KK: \CF
KK: \Cm KK: \Cm
KK: x^2\[Return] KK: x^2\[Return]
Lang C CP: Putting selection at .*idx: 0 par: 0 pos: 0\n.*idx: 0 par: 0 pos: 0\n with len: 1
TestEnd pcregrep -M "Putting selection at .*idx: 0 par: 0 pos: 0\n.*idx: 0 par: 0 pos: 0" findadv-03.loga.txt #
Lang it_IT.utf8 CN: Part 2
TestBegin test2.lyx -dbg key,find > findadv-03.logb.txt 2>&1 KK: \[Escape]\C\[Home]
CP: Key (queried) [action=buffer-begin][Ctrl+Home]
KK: \Cm KK: \Cm
KK: x^2 -x^2\C\[Home] KK: x^2 -x^2\C\[Home]
KK: \Cs KK: \Cs
KK: \CF KK: \CF
KK: \[Delete]
KK: \Cm KK: \Cm
KK: x^2\[Return]\[Return] KK: x^2\[Return]\[Return]
CP: Putting selection at .*idx: 0 par: 0 pos: 0\n.*idx: 0 par: 0 pos: 0\n with len: 1
CP: Putting selection at .*idx: 0 par: 0 pos: 0\n.*idx: 0 par: 0 pos: 2\n with len: 1
TestEnd TestEnd
Lang C Lang C
Assert pcregrep -M "Putting selection at .*idx: 0 par: 0 pos: 0\n.*idx: 0 par: 0 pos: 2" findadv-03.logb.txt Assert searchPatterns.pl log=findadv-03.loga.txt patterns=findadv-03.ctrl

View File

@ -2,24 +2,30 @@
# #
Lang sk_SK.utf8 Lang sk_SK.utf8
TestBegin test.lyx -dbg key,find > findadv-05.loga.txt 2>&1 TestBegin test.lyx -dbg key,find > findadv-05.loga.txt 2>&1
CO: findadv-05.ctrl
CN: Part 1
KK: foo \Cefoo foo\Ce foo\C\[Home] KK: foo \Cefoo foo\Ce foo\C\[Home]
KK: \Cs KK: \Cs
KK: \CF KK: \CF
# Uncheck ignore format # Uncheck ignore format
KK: \At\Ai\Ah KK: \At\Ai\Ah
# Select emphasised
KK: \Ce KK: \Ce
KK: foo\[Return] KK: foo\[Return]
TestEnd CP: Putting selection at .*idx: 0 par: 0 pos: 4\n with len: 3
Lang C #
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 4\n with len: 3' findadv-05.loga.txt CN: Part 2
CP: Key (queried) [action=buffer-begin][Ctrl+Home]
Lang sk_SK.utf8 KK: \[Escape]\C\[Home]
TestBegin test.lyx -dbg key,find > findadv-05.logb.txt 2>&1
KK: \CF KK: \CF
# Uncheck ignore format KK: \[Delete]
KK: \At\Ai\Ah # Unchecked ignore format and emphasised already set
KK: \Ce #KK: \At\Ai\Ah
#KK: \Ce
KK: foo\[Return]\[Return] KK: foo\[Return]\[Return]
CP: Putting selection at .*idx: 0 par: 0 pos: 4\n with len: 3
CP: Putting selection at .*idx: 0 par: 0 pos: 8\n with len: 3
TestEnd TestEnd
Lang C Lang C
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 8\n with len: 3' findadv-05.logb.txt Assert searchPatterns.pl log=findadv-05.loga.txt patterns=findadv-05.ctrl

View File

@ -2,6 +2,8 @@
Lang sk_SK.utf8 Lang sk_SK.utf8
TestBegin test.lyx -dbg key,find > findadv-06.loga.txt 2>&1 TestBegin test.lyx -dbg key,find > findadv-06.loga.txt 2>&1
CO: findadv-06.ctrl
CN: Part 1
KK: foo\[Return] KK: foo\[Return]
KK: \Ap2 KK: \Ap2
KK: foo\[Return] KK: foo\[Return]
@ -14,17 +16,19 @@ KK: \At\Ai\Ah
KK: \Aj KK: \Aj
KK: \Ap2 KK: \Ap2
KK: foo\[Return] KK: foo\[Return]
TestEnd CP: Putting selection at .*idx: 0 par: 1 pos: 0\n with len: 3
Lang C
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 1 pos: 0\n with len: 3' findadv-06.loga.txt
# #
Lang sk_SK.utf8 CN: Part 2
TestBegin test.lyx -dbg key,find > findadv-06.logb.txt 2>&1 CP: Key (queried) [action=buffer-begin][Ctrl+Home]
KK: \C\[Home] KK: \[Escape]\C\[Home]
KK: \Axdialog-show findreplaceadv\[Return] KK: \Axdialog-show findreplaceadv\[Return]
KK: \[Delete]
# Uncheck ignore format # Uncheck ignore format
KK: \At\Ai\Ah #KK: \At\Ai\Ah
KK: \Aps
KK: foo\[Return]\[Return] KK: foo\[Return]\[Return]
CP: Putting selection at .*idx: 0 par: 0 pos: 0\n with len: 3
CP: Putting selection at .*idx: 0 par: 2 pos: 0\n with len: 3
TestEnd TestEnd
Lang C Lang C
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 2 pos: 0\n with len: 3' findadv-06.logb.txt Assert searchPatterns.pl log=findadv-06.loga.txt patterns=findadv-06.ctrl

View File

@ -2,6 +2,8 @@
Lang sk_SK.utf8 Lang sk_SK.utf8
TestBegin test.lyx -dbg key,find > findadv-07.loga.txt 2>&1 TestBegin test.lyx -dbg key,find > findadv-07.loga.txt 2>&1
CO: findadv-07.ctrl
CN: Part 1
KK: foo bar\[Return] KK: foo bar\[Return]
#select itemized #select itemized
KK: \Apb KK: \Apb
@ -14,18 +16,19 @@ KK: \Axdialog-show findreplaceadv\[Return]
KK: \At\Ai\Ah KK: \At\Ai\Ah
KK: \Apb KK: \Apb
KK: foo\[Return] KK: foo\[Return]
TestEnd CP: Putting selection at .*idx: 0 par: 1 pos: 0\n with len: 3
Lang C
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 1 pos: 0\n with len: 3' findadv-07.loga.txt
# #
Lang sk_SK.utf8 CN: Part 2
TestBegin test.lyx -dbg key,find > findadv-07.logb.txt 2>&1 CP: Key (queried) [action=buffer-begin][Ctrl+Home]
KK: \[Escape]\C\[Home]
KK: \C\[Home] KK: \C\[Home]
KK: \CF KK: \CF
KK: \[Delete]
# Uncheck ignore format # Uncheck ignore format
KK: \At\Ai\Ah #KK: \At\Ai\Ah
KK: \Apb KK: \Apb
KK: bar\[Return] KK: bar\[Return]
CP: Putting selection at .*idx: 0 par: 1 pos: 4\n with len: 3
TestEnd TestEnd
Lang C Lang C
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 1 pos: 4\n with len: 3' findadv-07.logb.txt Assert searchPatterns.pl log=findadv-07.loga.txt patterns=findadv-07.ctrl

View File

@ -2,6 +2,9 @@
Lang sk_SK.utf8 Lang sk_SK.utf8
TestBegin test.lyx -dbg key,find > findadv-08.loga.txt 2>&1 TestBegin test.lyx -dbg key,find > findadv-08.loga.txt 2>&1
CO: findadv-08.ctrl
CN: Started findadv-08 1
CP: Key (queried) [action=buffer-begin][Ctrl+Home]
KK: Nel mezzo del cammin di nostra vita\[Return] KK: Nel mezzo del cammin di nostra vita\[Return]
KK: mi ritrovai per una selva oscura\C\[Home] KK: mi ritrovai per una selva oscura\C\[Home]
KK: \Axbuffer-write\[Return] KK: \Axbuffer-write\[Return]
@ -9,13 +12,11 @@ KK: \Axdialog-show findreplaceadv\[Return]
KK: o KK: o
KK: \Axregexp-mode\[Return] KK: \Axregexp-mode\[Return]
KK: .* a\[Return] KK: .* a\[Return]
TestEnd CP: Putting selection at .*idx: 0 par: 0 pos: 8\n with len: 8
Lang C #
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 8\n with len: 8' findadv-08.loga.txt CN: Started findadv-08 2
KK: \[Escape]\C\[Home]\Axdialog-show findreplaceadv\[Return]
Lang sk_SK.utf8 KK: \[Delete]
TestBegin test.lyx -dbg key,find > findadv-08.logb.txt 2>&1
KK: \C\[Home]\Axdialog-show findreplaceadv\[Return]
KK: o KK: o
KK: \Axregexp-mode\[Return] KK: \Axregexp-mode\[Return]
KK: [\\w]* a KK: [\\w]* a
@ -25,17 +26,19 @@ KD: 100
KK: \Ac\Ac KK: \Ac\Ac
# search next # search next
KK: \Al KK: \Al
TestEnd KK: \[Escape]
Lang C #KD: 1
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 1 pos: 26\n with len: 6' findadv-08.logb.txt CP: Putting selection at .*idx: 0 par: 1 pos: 26\n with len: 6
#
Lang sk_SK.utf8 CN: Started findadv-08 3
TestBegin test.lyx -dbg key,find > findadv-08.logc.txt 2>&1 KK: \[Escape]
KK: \C\[Home]\Axdialog-show findreplaceadv\[Return] KK: \C\[Home]\Axdialog-show findreplaceadv\[Return]
KK: \[Delete]
KK: \Axregexp-mode\[Return] KK: \Axregexp-mode\[Return]
KK: .* \Ac\Ac KK: .*
KK: \Al\Al\Al KK: \Al\Al\Al
#KK: \[Tab]\[Return] CP: Putting selection at .*idx: 0 par: 0 pos: 10\n with len: 3
TestEnd TestEnd
Lang C CC:
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 10\n with len: 3' findadv-08.logc.txt Assert searchPatterns.pl log=findadv-08.loga.txt patterns=findadv-08.ctrl

View File

@ -2,6 +2,8 @@
Lang sk_SK.utf8 Lang sk_SK.utf8
TestBegin test.lyx -dbg key,find > findadv-09.loga.txt 2>&1 TestBegin test.lyx -dbg key,find > findadv-09.loga.txt 2>&1
CO: findadv-09.ctrl
CN: Part 1
KK: \Apb KK: \Apb
KK: one\[Return]two\[Return]three\C\[Home]\Cs KK: one\[Return]two\[Return]three\C\[Home]\Cs
KK: \CF KK: \CF
@ -9,17 +11,19 @@ KK: \CF
KK: \At\Ai\Ah KK: \At\Ai\Ah
KK: \Apb KK: \Apb
KK: \Axregexp-mode\[Return][a-z]* \[Return] KK: \Axregexp-mode\[Return][a-z]* \[Return]
TestEnd CP: Putting selection at .*idx: 0 par: 0 pos: 0\n with len: 3
Lang C
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 0\n with len: 3' findadv-09.loga.txt
Lang sk_SK.utf8 CN: Part 2
TestBegin test.lyx -dbg key,find > findadv-09.logb.txt 2>&1 CP: Key (queried) [action=buffer-begin][Ctrl+Home]
KK: \[Escape]\C\[Home]
KK: \CF KK: \CF
KK: \[Delete]
# Uncheck ignore format # Uncheck ignore format
KK: \At\Ai\Ah #KK: \At\Ai\Ah
KK: \Apb KK: \Apb
KK: \Axregexp-mode\[Return][a-z]* \[Return]\[Return] KK: \Axregexp-mode\[Return][a-z]* \[Return]\[Return]
CP: Putting selection at .*idx: 0 par: 0 pos: 0\n with len: 3
CP: Putting selection at .*idx: 0 par: 1 pos: 0\n with len: 3
TestEnd TestEnd
Lang C Lang C
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 1 pos: 0\n with len: 3' findadv-09.logb.txt Assert searchPatterns.pl log=findadv-09.loga.txt patterns=findadv-09.ctrl

View File

@ -3,6 +3,8 @@
Lang sk_SK.utf8 Lang sk_SK.utf8
TestBegin test.lyx -dbg key,find > findadv-10.loga.txt 2>&1 TestBegin test.lyx -dbg key,find > findadv-10.loga.txt 2>&1
CO: findadv-10.ctrl
CN: Part 1
KK: This is LyX,\[Return] KK: This is LyX,\[Return]
KK: a WYSIWYG LaTeX editor.\C\[Home] KK: a WYSIWYG LaTeX editor.\C\[Home]
KK: \Cs KK: \Cs
@ -10,16 +12,17 @@ KK: \CF
# Uncheck ignore format (depends on IT language) # Uncheck ignore format (depends on IT language)
KK: \At\Ai\Ah KK: \At\Ai\Ah
KK: LyX\[Return] KK: LyX\[Return]
TestEnd CP: Putting selection at .*idx: 0 par: 0 pos: 8\n with len: 3
Lang C #
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 8\n with len: 3' findadv-10.loga.txt CN: Part 2
CP: Key (queried) [action=buffer-begin][Ctrl+Home]
Lang sk_SK.utf8 KK: \[Escape]\C\[Home]
TestBegin test.lyx -dbg key,find > findadv-10.logb.txt 2>&1
KK: \CF KK: \CF
KK: \[Delete]
# Uncheck ignore format # Uncheck ignore format
KK: \At\Ai\Ah #KK: \At\Ai\Ah
KK: LaTeX\[Return] KK: LaTeX\[Return]
CP: Putting selection at .*idx: 0 par: 1 pos: 10\n with len: 5
TestEnd TestEnd
Lang C Lang C
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 1 pos: 10\n with len: 5' findadv-10.logb.txt Assert searchPatterns.pl log=findadv-10.loga.txt patterns=findadv-10.ctrl

View File

@ -2,20 +2,22 @@
# #
Lang it_IT.utf8 Lang it_IT.utf8
TestBegin test.lyx -dbg key,find > findadv-11.loga.txt 2>&1 TestBegin test.lyx -dbg key,find > findadv-11.loga.txt 2>&1
CO: findadv-11.ctrl
CN: Part 1
KK: \Cm KK: \Cm
KK: x_v \C\[Home] KK: x_v \C\[Home]
KK: \Cs KK: \Cs
KK: \CF KK: \CF
KK: \Cm KK: \Cm
KK: v\[Return] KK: v\[Return]
TestEnd CP: Putting selection at .*idx: 0 par: 0 pos: 0\n.*idx: 0 par: 0 pos: 0\n.*idx: 1 par: 0 pos: 0\n with len: 1
Lang C
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 0\n.*idx: 0 par: 0 pos: 0\n.*idx: 1 par: 0 pos: 0\n with len: 1' findadv-11.loga.txt
Lang sk_SK.utf8 #
TestBegin test.lyx -dbg key,find > findadv-11.logb.txt 2>&1 CN: Part 2
KK: \C\[Home] CP: Key (queried) [action=buffer-begin][Ctrl+Home]
KK: \[Escape]\C\[Home]
KK: \CF KK: \CF
KK: \[Delete]
# Uncheck ignore format # Uncheck ignore format
KK: \At\Ai\Ah KK: \At\Ai\Ah
KK: \Cm KK: \Cm

View File

@ -2,6 +2,8 @@
# #
Lang sk_SK.utf8 Lang sk_SK.utf8
TestBegin test.lyx -dbg key,find > findadv-14.loga.txt 2>&1 TestBegin test.lyx -dbg key,find > findadv-14.loga.txt 2>&1
CO: findadv-14.ctrl
CN: Part 1
KK: \Axmath-display\[Return] KK: \Axmath-display\[Return]
KK: x^2 +x^2\C\[Home] KK: x^2 +x^2\C\[Home]
KK: \Cs KK: \Cs
@ -10,35 +12,33 @@ KK: \CF
KK: \At\Ai\Ah KK: \At\Ai\Ah
KK: \Axmath-display\[Return] KK: \Axmath-display\[Return]
KK: x^2\[Return] KK: x^2\[Return]
TestEnd CP: Putting selection at .*idx: 0 par: 0 pos: 0\n.*idx: 0 par: 0 pos: 0\n with len: 1
Lang C #
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 0\n.*idx: 0 par: 0 pos: 0\n with len: 1' findadv-14.loga.txt CN: Part 2
KK: \[Escape]\C\[Home]
Lang sk_SK.utf8
TestBegin test.lyx -dbg key,find > findadv-14.logb.txt 2>&1
KK: \CF KK: \CF
# Uncheck ignore format KK: \[Delete]
KK: \Axmath-display\[Return]
KK: x^2\[Return]\[Return]
CP: Putting selection at .*idx: 0 par: 0 pos: 0\n.*idx: 0 par: 0 pos: 2\n with len: 1
#
CN: Part 3
KK: \[Escape]\C\[Home]
KK: \CF
KK: \[Delete]
KK: \At\Ai\Ah KK: \At\Ai\Ah
KK: \Axmath-display\[Return] KK: \Axmath-display\[Return]
KK: x^2\[Return]\[Return]
TestEnd
Lang C
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 0\n.*idx: 0 par: 0 pos: 2\n with len: 1' findadv-14.logb.txt
Lang it_IT.utf8
TestBegin test.lyx -dbg key,find > findadv-14.logc.txt 2>&1
KK: \CF
KK: \Axmath-display\[Return]
KK: x^2\[Return] KK: x^2\[Return]
TestEnd CP: Putting selection at .*idx: 0 par: 0 pos: 0\n.*idx: 0 par: 0 pos: 0\n with len: 1
Lang C
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 0\n.*idx: 0 par: 0 pos: 0\n with len: 1' findadv-14.logc.txt
Lang it_IT.utf8 #
TestBegin test.lyx -dbg key,find > findadv-14.logd.txt 2>&1 CN: Part 4
KK: \[Escape]\C\[Home]
KK: \CF KK: \CF
KK: \[Delete]
KK: \Axmath-display\[Return] KK: \Axmath-display\[Return]
KK: x^2\[Return]\[Return] KK: x^2\[Return]\[Return]
CP: Putting selection at .*idx: 0 par: 0 pos: 0\n.*idx: 0 par: 0 pos: 2\n with len: 1
TestEnd TestEnd
Lang C Assert searchPatterns.pl log=findadv-14.loga.txt patterns=findadv-14.ctrl
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 0\n.*idx: 0 par: 0 pos: 2\n with len: 1' findadv-14.logd.txt

View File

@ -2,6 +2,8 @@
# #
Lang sk_SK.utf8 Lang sk_SK.utf8
TestBegin test.lyx -dbg key,find > findadv-15.loga.txt 2>&1 TestBegin test.lyx -dbg key,find > findadv-15.loga.txt 2>&1
CO: findadv-15.ctrl
CN: Part 1
KK: \CM\Axmath-number-toggle\[Return] KK: \CM\Axmath-number-toggle\[Return]
KK: x^2 +x^2\C\[Home] KK: x^2 +x^2\C\[Home]
KK: \Cs KK: \Cs
@ -10,35 +12,34 @@ KK: \CF
KK: \At\Ai\Ah KK: \At\Ai\Ah
KK: \CM\Axmath-number-toggle\[Return] KK: \CM\Axmath-number-toggle\[Return]
KK: x^2\[Return] KK: x^2\[Return]
TestEnd CP: Putting selection at .*idx: 0 par: 0 pos: 0\n.*idx: 0 par: 0 pos: 0\n with len: 1
Lang C
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 0\n.*idx: 0 par: 0 pos: 0\n with len: 1' findadv-15.loga.txt
Lang sk_SK.utf8 CN: Part 2
TestBegin test.lyx -dbg key,find > findadv-15.logb.txt 2>&1 KK: \[Escape]\C\[Home]
KK: \CF KK: \CF
# Uncheck ignore format KK: \[Delete]
KK: \CM\Axmath-number-toggle\[Return]
KK: x^2\[Return]\[Return]
CP: Putting selection at .*idx: 0 par: 0 pos: 0\n.*idx: 0 par: 0 pos: 2\n with len: 1
Lang it_IT.utf8
CN: Part 3
KK: \[Escape]\C\[Home]
KK: \CF
KK: \[Delete]
# Check ignore format (was unchecked)
KK: \At\Ai\Ah KK: \At\Ai\Ah
KK: \CM\Axmath-number-toggle\[Return] KK: \CM\Axmath-number-toggle\[Return]
KK: x^2\[Return]\[Return]
TestEnd
Lang C
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 0\n.*idx: 0 par: 0 pos: 2\n with len: 1' findadv-15.logb.txt
Lang it_IT.utf8
TestBegin test.lyx -dbg key,find > findadv-15.logc.txt 2>&1
KK: \CF
KK: \CM\Axmath-number-toggle\[Return]
KK: x^2\[Return] KK: x^2\[Return]
TestEnd CP: Putting selection at .*idx: 0 par: 0 pos: 0\n.*idx: 0 par: 0 pos: 0\n with len: 1
Lang C
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 0\n.*idx: 0 par: 0 pos: 0\n with len: 1' findadv-15.logc.txt
Lang it_IT.utf8 CN: Part 4
TestBegin test.lyx -dbg key,find > findadv-15.logd.txt 2>&1 KK: \[Escape]\C\[Home]
KK: \CF KK: \CF
KK: \[Delete]
KK: \CM\Axmath-number-toggle\[Return] KK: \CM\Axmath-number-toggle\[Return]
KK: x^2\[Return]\[Return] KK: x^2\[Return]\[Return]
CP: Putting selection at .*idx: 0 par: 0 pos: 0\n.*idx: 0 par: 0 pos: 2\n with len: 1
TestEnd TestEnd
Lang C Assert searchPatterns.pl log=findadv-15.loga.txt patterns=findadv-15.ctrl
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 0\n.*idx: 0 par: 0 pos: 2\n with len: 1' findadv-15.logd.txt

View File

@ -3,6 +3,8 @@
# #
Lang sk_SK.utf8 Lang sk_SK.utf8
TestBegin test.lyx -dbg key,find > findadv-16.loga.txt 2>&1 TestBegin test.lyx -dbg key,find > findadv-16.loga.txt 2>&1
CO: findadv-16.ctrl
CN: Part 1
KK: \CM\Axmath-mutate gather\[Return] KK: \CM\Axmath-mutate gather\[Return]
KK: x^2 +x^2\C\[Home] KK: x^2 +x^2\C\[Home]
KK: \Cs KK: \Cs
@ -11,17 +13,17 @@ KK: \CF
KK: \At\Ai\Ah KK: \At\Ai\Ah
KK: \CM\Axmath-mutate gather\[Return] KK: \CM\Axmath-mutate gather\[Return]
KK: x^2\[Return] KK: x^2\[Return]
TestEnd CP: Putting selection at .*idx: 0 par: 0 pos: 0\n.*idx: 0 par: 0 pos: 0\n with len: 1
Lang C
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 0\n.*idx: 0 par: 0 pos: 0\n with len: 1' findadv-16.loga.txt
Lang sk_SK.utf8 #
TestBegin test.lyx -dbg key,find > findadv-16.logb.txt 2>&1 CN: Part 2
KK: \[Escape]\C\[Home]
KK: \CF KK: \CF
# Uncheck ignore format KK: \[Delete]
KK: \At\Ai\Ah
KK: \CM\Axmath-mutate gather\[Return] KK: \CM\Axmath-mutate gather\[Return]
KK: x^2\[Return]\[Return] KK: x^2\[Return]\[Return]
TestEnd TestEnd
Lang C Lang C
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 0\n.*idx: 0 par: 0 pos: 2\n with len: 1' findadv-16.logb.txt CP: Putting selection at .*idx: 0 par: 0 pos: 0\n.*idx: 0 par: 0 pos: 2\n with len: 1
Assert searchPatterns.pl log=findadv-16.loga.txt patterns=findadv-16.ctrl

View File

@ -2,20 +2,22 @@
# #
Lang it_IT.utf8 Lang it_IT.utf8
TestBegin test.lyx -dbg key,find > findadv-17.loga.txt 2>&1 TestBegin test.lyx -dbg key,find > findadv-17.loga.txt 2>&1
CO: findadv-17.ctrl
CN: Part 1
KK: \Cm\\alpha\\beta\\alpha \C\[Home] KK: \Cm\\alpha\\beta\\alpha \C\[Home]
KK: \Cs KK: \Cs
KK: \CF KK: \CF
KK: \Cm\\beta\\alpha \[Return] KK: \Cm\\beta\\alpha \[Return]
TestEnd CP: Putting selection at .*idx: 0 par: 0 pos: 0\n.*idx: 0 par: 0 pos: 1\n with len: 2
Lang C
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 0\n.*idx: 0 par: 0 pos: 1\n with len: 2' findadv-17.loga.txt
Lang sk_SK.utf8 #
TestBegin test.lyx -dbg key,find > findadv-17.logb.txt 2>&1 CN: Part 2
KK: \[Escape]\C\[Home]
KK: \CF KK: \CF
KK: \[Delete]
# Uncheck ignore format # Uncheck ignore format
KK: \At\Ai\Ah KK: \At\Ai\Ah
KK: \Cm\\beta\\alpha \[Return] KK: \Cm\\beta\\alpha \[Return]
CP: Putting selection at .*idx: 0 par: 0 pos: 0\n.*idx: 0 par: 0 pos: 1\n with len: 2
TestEnd TestEnd
Lang C Assert searchPatterns.pl log=findadv-17.loga.txt patterns=findadv-17.ctrl
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 0\n.*idx: 0 par: 0 pos: 1\n with len: 2' findadv-17.logb.txt

View File

@ -4,24 +4,29 @@
Lang it_IT.utf8 Lang it_IT.utf8
TestBegin test.lyx -dbg key,find > findadv-20.loga.txt 2>&1 TestBegin test.lyx -dbg key,find > findadv-20.loga.txt 2>&1
CO: findadv-20.1.ctrl
CN: Part 1
KK: a a a\C\[Home] KK: a a a\C\[Home]
KK: \CF KK: \CF
KK: a\[Tab] KK: a\[Tab]
KK: \Cm\\frac 1\[Down]a\[Return]\[Return]\[Return] KK: \Cm\\frac 1\[Down]a\[Return]\[Return]\[Return]
KK: \Cs KK: \Cs
KK: \Axbuffer-export latex\[Return] KK: \Axbuffer-export latex\[Return]
CR: \$\\frac\{1\}\{a\}\$ \$\\frac\{1\}\{a\}\$ a
TestEnd TestEnd
Lang C
Assert pcregrep -M '^\$\\frac\{1\}\{a\}\$ \$\\frac\{1\}\{a\}\$ a' test.tex
Lang it_IT.utf8 Lang it_IT.utf8
TestBegin test2.lyx -dbg key,find > findadv-20.logb.txt 2>&1 TestBegin test2.lyx -dbg key,find > findadv-20.logb.txt 2>&1
CO: findadv-20.2.ctrl
CN: Part 2
KK: \Cma \Cma \Cma \C\[Home] KK: \Cma \Cma \Cma \C\[Home]
KK: \CF KK: \CF
KK: a\[Tab] KK: a\[Tab]
KK: \Cm\\frac 1\[Down]a\[Return]\[Return]\[Return] KK: \Cm\\frac 1\[Down]a\[Return]\[Return]\[Return]
KK: \Cs KK: \Cs
KK: \Axbuffer-export latex\[Return] KK: \Axbuffer-export latex\[Return]
CR: ^\$\\frac\{1\}\{a\}\$ \$\\frac\{1\}\{a\}\$ \$a\$
TestEnd TestEnd
Lang C Lang C
Assert pcregrep -M '^\$\\frac\{1\}\{a\}\$ \$\\frac\{1\}\{a\}\$ \$a\$' test2.tex Assert searchPatterns.pl log=test.tex patterns=findadv-20.1.ctrl
Assert searchPatterns.pl log=test2.tex patterns=findadv-20.2.ctrl

View File

@ -2,7 +2,7 @@
# #
Lang sk_SK.utf8 Lang sk_SK.utf8
TestBegin test.lyx -dbg key,find > findadv-combined.loga.txt 2>&1 TestBegin test.lyx -dbg key,find > findadv-combined.loga.txt 2>&1
CO: searchStrings CO: findadv-combined.ctrl
CP: Key (queried) [action=buffer-begin][Ctrl+Home] CP: Key (queried) [action=buffer-begin][Ctrl+Home]
# String to be checked # String to be checked
KK: \\()[]{}%^#@?*.\[Return] KK: \\()[]{}%^#@?*.\[Return]
@ -201,5 +201,4 @@ CP: Putting selection at .*idx: 0 par: 4 pos: 10\n with len: 1
# #
TestEnd TestEnd
CC: CC:
Assert searchPatterns.pl log=findadv-combined.loga.txt patterns=searchStrings Assert searchPatterns.pl log=findadv-combined.loga.txt patterns=findadv-combined.ctrl
#/usr2/src/lyx/lyx-git/development/autotests/searchPatterns.pl

View File

@ -205,8 +205,7 @@ class ControlFile:
elif command == "CR": elif command == "CR":
self.addline("Regex: " + text) self.addline("Regex: " + text)
else: else:
print("Error") die(1,"Error, Unrecognised Command '" + command + "'")
die(1,"208")
return True return True
@ -238,6 +237,8 @@ def lyx_exists():
# Interruptible os.system() # Interruptible os.system()
def intr_system(cmd, ignore_err = False): def intr_system(cmd, ignore_err = False):
print("Executing " + cmd) print("Executing " + cmd)
# Assure the output of cmd does not overhaul
sys.stdout.flush()
ret = os.system(cmd) ret = os.system(cmd)
if os.WIFSIGNALED(ret): if os.WIFSIGNALED(ret):
raise KeyboardInterrupt raise KeyboardInterrupt
@ -676,7 +677,6 @@ while not failed:
time.sleep(0.5) time.sleep(0.5)
dead_expected = True dead_expected = True
is_sleeping = wait_until_lyx_sleeping(lyx_pid) is_sleeping = wait_until_lyx_sleeping(lyx_pid)
print("Leaved wait TestEnd")
if is_sleeping: if is_sleeping:
print('wait_until_lyx_sleeping() indicated "sleeping"') print('wait_until_lyx_sleeping() indicated "sleeping"')
# For a short time lyx-status is 'sleeping', even if it is nearly dead. # For a short time lyx-status is 'sleeping', even if it is nearly dead.