Cmake key-tests: These are very touchy in respect to timings
1.) Try to use shortcuts instead of direct command
2.) use bigger pause where needed
# Test for searching with regular expressions
UseShortcut "C-F30" "layout Itemize"
# Test for searching with regular expressions
UseShortcut "C-F30" "layout Itemize"
+UseShortcut "C-F20" "regexp-mode"
KK: \At\Ai\Ah
KK: \CF
KK: \C\[F30]
KK: \At\Ai\Ah
KK: \CF
KK: \C\[F30]
-KK: \Axregexp-mode\[Return][a-z]* \[Return]
+KK: \C\[F20][a-z]* \[Return]
CP: Putting selection at .*idx: 0 par: 0 pos: 0\n with len: 3
CN: Part 2
CP: Putting selection at .*idx: 0 par: 0 pos: 0\n with len: 3
CN: Part 2
#KK: \At\Ai\Ah
#KK: \CF
KK: \C\[F30]
#KK: \At\Ai\Ah
#KK: \CF
KK: \C\[F30]
-KK: \Axregexp-mode\[Return][a-z]* \[Return]\[Return]
+KK: \C\[F20][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
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
# Searching for regexp with e.g. \[Backspace]\[Backspace]s finds blanks
# Searching for regexp with e.g. \[Backspace]\[Backspace]s finds blanks
+UseShortcut "C-F20" "regexp-mode"
+PrepareShortcuts
Lang it_IT.utf8
CO: findadv-18.ctrl
Lang it_IT.utf8
CO: findadv-18.ctrl
KK: a b c\C\[Home]
KK: \Cs
KK: \CF
KK: a b c\C\[Home]
KK: \Cs
KK: \CF
-KK: \Axregexp-mode\[Return]\\s\[Return]
+KK: \C\[F20]\\s\[Return]
CP: Putting selection at .*idx: 0 par: 0 pos: 1\n with len: 1
TestEnd
Lang C
CP: Putting selection at .*idx: 0 par: 0 pos: 1\n with len: 1
TestEnd
Lang C
# Check that searching for regexp "([a-z]+)\s\1" finds duplicate words.
# Check that searching for regexp "([a-z]+)\s\1" finds duplicate words.
+UseShortcut "C-F20" "regexp-mode"
+PrepareShortcuts
Lang it_IT.utf8
CO: findadv-19.ctrl
Lang it_IT.utf8
CO: findadv-19.ctrl
KK: Hello world world!\C\[Home]
KK: \Cs
KK: \CF
KK: Hello world world!\C\[Home]
KK: \Cs
KK: \CF
-KK: \Axregexp-mode\[Return]([a-z]+)\\s\\1\[Return]
+KK: \C\[F20]([a-z]+)\\s\\1\[Return]
CP: Putting selection at .*idx: 0 par: 0 pos: 6\n with len: 11
Sleep 1
TestEnd
CP: Putting selection at .*idx: 0 par: 0 pos: 6\n with len: 11
Sleep 1
TestEnd
# Avoiding recursive replacements when replaced text matches search pattern
# Addresses #7675.
#
# Avoiding recursive replacements when replaced text matches search pattern
# Addresses #7675.
#
Lang it_IT.utf8
CO: findadv-20.1.ctrl
TestBegin test.lyx -dbg key,find > findadv-20.loga.txt 2>&1
CN: Part 1
Lang it_IT.utf8
CO: findadv-20.1.ctrl
TestBegin test.lyx -dbg key,find > findadv-20.loga.txt 2>&1
CN: Part 1
KK: a a a\C\[Home]
KK: \CF
KK: a\[Tab]
KK: a a a\C\[Home]
KK: \CF
KK: a\[Tab]
CO: findadv-20.2.ctrl
TestBegin test2.lyx -dbg key,find > findadv-20.logb.txt 2>&1
CN: Part 2
CO: findadv-20.2.ctrl
TestBegin test2.lyx -dbg key,find > findadv-20.logb.txt 2>&1
CN: Part 2
KK: \Cma \Cma \Cma \C\[Home]
KK: \CF
KK: a\[Tab]
KK: \Cma \Cma \Cma \C\[Home]
KK: \CF
KK: a\[Tab]
# Test for searching with regular expressions
# Test for #8381
# Test for searching with regular expressions
# Test for #8381
+UseShortcut "C-F20" "regexp-mode"
+PrepareShortcuts
Lang sk_SK.utf8
CO: findadv-21.ctrl
Lang sk_SK.utf8
CO: findadv-21.ctrl
KK: \At\Ai\Ah
KK: \CF
KK: \Aoe
KK: \At\Ai\Ah
KK: \CF
KK: \Aoe
-KK: \Axregexp-mode\[Return][a-z]* \[Return]\[Return]
+KK: \C\[F20][a-z]* \[Return]\[Return]
Cr: ^.*Putting
#Cr: ^.*action=buffer-begin
CP: Putting selection at cur= inset: .* idx: 0 par: 3 pos: 0\n with len: 4
Cr: ^.*Putting
#Cr: ^.*action=buffer-begin
CP: Putting selection at cur= inset: .* idx: 0 par: 3 pos: 0\n with len: 4
#KK: \At\Ai\Ah
#KK: \CF
KK: \Aol
#KK: \At\Ai\Ah
#KK: \CF
KK: \Aol
-KK: \Axregexp-mode\[Return][a-z]2 \Axregexp-mode\[Return][a-z]+
+KK: \C\[F20][a-z]2 \C\[F20][a-z]+
KK: \[Return]\[Return]\[Return]\[Return]\[Return]\[Return]
Cr: ^.*Putting
CP: Putting selection at cur= inset: .* idx: 0 par: 6 pos: 0\n with len: 8
KK: \[Return]\[Return]\[Return]\[Return]\[Return]\[Return]
Cr: ^.*Putting
CP: Putting selection at cur= inset: .* idx: 0 par: 6 pos: 0\n with len: 8
# Finding special latex/regexp chars: (
#
# Finding special latex/regexp chars: (
#
+UseShortcut "C-F20" "regexp-mode"
+PrepareShortcuts
+
Lang it_IT.utf8
KD: 100
CO: findadv-re-01.ctrl
Lang it_IT.utf8
KD: 100
CO: findadv-re-01.ctrl
KK: \\()[]{}%^#@?*.\C\[Home]
KK: \Cs
KK: \CF
KK: \\()[]{}%^#@?*.\C\[Home]
KK: \Cs
KK: \CF
-KK: \Axregexp-mode\[Return]\\(\[Return]
+KK: \C\[F20]\\(\[Return]
CP: Putting selection at .*idx: 0 par: 0 pos: 1\n with len: 1
TestEnd
#
CP: Putting selection at .*idx: 0 par: 0 pos: 1\n with len: 1
TestEnd
#
# Uncheck ignore format
KK: \At\Ai\Ah
KK: \CF
# Uncheck ignore format
KK: \At\Ai\Ah
KK: \CF
-KK: \Axregexp-mode\[Return]\\(\[Return]
+KK: \C\[F20]\\(\[Return]
CP: Putting selection at .*idx: 0 par: 0 pos: 1\n with len: 1
TestEnd
CP: Putting selection at .*idx: 0 par: 0 pos: 1\n with len: 1
TestEnd
TestBegin test.lyx -dbg key,find >> findadv-re-01.loga.txt 2>&1
CN: Part 3
KK: \CF
TestBegin test.lyx -dbg key,find >> findadv-re-01.loga.txt 2>&1
CN: Part 3
KK: \CF
-KK: \Axregexp-mode\[Return]\\[\[Return]
+KK: \C\[F20]\\[\[Return]
CP: Putting selection at .*idx: 0 par: 0 pos: 3\n with len: 1
TestEnd
#
CP: Putting selection at .*idx: 0 par: 0 pos: 3\n with len: 1
TestEnd
#
# Uncheck ignore format
KK: \At\Ai\Ah
KK: \CF
# Uncheck ignore format
KK: \At\Ai\Ah
KK: \CF
-KK: \Axregexp-mode\[Return]\\[\[Return]
+KK: \C\[F20]\\[\[Return]
CP: Putting selection at .*idx: 0 par: 0 pos: 3\n with len: 1
TestEnd
Lang C
CP: Putting selection at .*idx: 0 par: 0 pos: 3\n with len: 1
TestEnd
Lang C
# Finding special latex/regexp chars: \
#
# Finding special latex/regexp chars: \
#
+UseShortcut "C-F20" "regexp-mode"
+PrepareShortcuts
+
Lang it_IT.utf8
CO: findadv-re-02.ctrl
TestBegin test.lyx -dbg key,find > findadv-re-02.loga.txt 2>&1
Lang it_IT.utf8
CO: findadv-re-02.ctrl
TestBegin test.lyx -dbg key,find > findadv-re-02.loga.txt 2>&1
KK: \\()[]{}%^#@?*.\C\[Home]
KK: \Cs
KK: \CF
KK: \\()[]{}%^#@?*.\C\[Home]
KK: \Cs
KK: \CF
-KK: \Axregexp-mode\[Return]\\\\\[Return]
+KK: \C\[F20]\\\\\[Return]
CP: Putting selection at .*idx: 0 par: 0 pos: 0\n with len: 1
TestEnd
#
CP: Putting selection at .*idx: 0 par: 0 pos: 0\n with len: 1
TestEnd
#
# Uncheck ignore format
KK: \At\Ai\Ah
KK: \CF
# Uncheck ignore format
KK: \At\Ai\Ah
KK: \CF
-KK: \Axregexp-mode\[Return]\\\\\[Return]
+KK: \C\[F20]\\\\\[Return]
CP: Putting selection at .*idx: 0 par: 0 pos: 0\n with len: 1
TestEnd
CP: Putting selection at .*idx: 0 par: 0 pos: 0\n with len: 1
TestEnd
CN: Part 3
CO: >> findadv-re-02.ctrl
KK: \CF
CN: Part 3
CO: >> findadv-re-02.ctrl
KK: \CF
-KK: \Axregexp-mode\[Return]%\[Return]
CP: Putting selection at .*idx: 0 par: 0 pos: 7\n with len: 1
TestEnd
#
CP: Putting selection at .*idx: 0 par: 0 pos: 7\n with len: 1
TestEnd
#
# Uncheck ignore format
KK: \At\Ai\Ah
KK: \CF
# Uncheck ignore format
KK: \At\Ai\Ah
KK: \CF
-KK: \Axregexp-mode\[Return]%\[Return]
CP: Putting selection at .*idx: 0 par: 0 pos: 7\n with len: 1
TestEnd
CP: Putting selection at .*idx: 0 par: 0 pos: 7\n with len: 1
TestEnd
TestBegin test.lyx -dbg key,find >> findadv-re-02.loga.txt 2>&1
CN: Part 5
KK: \CF
TestBegin test.lyx -dbg key,find >> findadv-re-02.loga.txt 2>&1
CN: Part 5
KK: \CF
-KK: \Axregexp-mode\[Return]\\^\[Return]
+KK: \C\[F20]\\^\[Return]
CP: Putting selection at .*idx: 0 par: 0 pos: 8\n with len: 1
TestEnd
#
CP: Putting selection at .*idx: 0 par: 0 pos: 8\n with len: 1
TestEnd
#
# Uncheck ignore format
KK: \At\Ai\Ah
KK: \CF
# Uncheck ignore format
KK: \At\Ai\Ah
KK: \CF
-KK: \Axregexp-mode\[Return]\\^\[Return]
+KK: \C\[F20]\\^\[Return]
CP: Putting selection at .*idx: 0 par: 0 pos: 8\n with len: 1
TestEnd
Lang C
CP: Putting selection at .*idx: 0 par: 0 pos: 8\n with len: 1
TestEnd
Lang C
# Finding special latex/regexp chars: {
#
# Finding special latex/regexp chars: {
#
+UseShortcut "C-F20" "regexp-mode"
+PrepareShortcuts
+
Lang it_IT.utf8
CO: findadv-re-03.ctrl
TestBegin test.lyx -dbg key,find > findadv-re-03.loga.txt 2>&1
Lang it_IT.utf8
CO: findadv-re-03.ctrl
TestBegin test.lyx -dbg key,find > findadv-re-03.loga.txt 2>&1
KK: \\()[]{}%^#@?*.\C\[Home]
KK: \Cs
KK: \CF
KK: \\()[]{}%^#@?*.\C\[Home]
KK: \Cs
KK: \CF
-KK: \Axregexp-mode\[Return]\\{\[Return]
+KK: \C\[F20]\\{\[Return]
CP: Putting selection at .*idx: 0 par: 0 pos: 5\n with len: 1
TestEnd
#
CP: Putting selection at .*idx: 0 par: 0 pos: 5\n with len: 1
TestEnd
#
# Uncheck ignore format
KK: \At\Ai\Ah
KK: \CF
# Uncheck ignore format
KK: \At\Ai\Ah
KK: \CF
-KK: \Axregexp-mode\[Return]\\{\[Return]
+KK: \C\[F20]\\{\[Return]
CP: Putting selection at .*idx: 0 par: 0 pos: 5\n with len: 1
TestEnd
#
CP: Putting selection at .*idx: 0 par: 0 pos: 5\n with len: 1
TestEnd
#
TestBegin test.lyx -dbg key,find >> findadv-re-03.loga.txt 2>&1
CN: Part 3
KK: \CF
TestBegin test.lyx -dbg key,find >> findadv-re-03.loga.txt 2>&1
CN: Part 3
KK: \CF
-KK: \Axregexp-mode\[Return]\\}\[Return]
+KK: \C\[F20]\\}\[Return]
CP: Putting selection at .*idx: 0 par: 0 pos: 6\n with len: 1
TestEnd
#
CP: Putting selection at .*idx: 0 par: 0 pos: 6\n with len: 1
TestEnd
#
# Uncheck ignore format
KK: \At\Ai\Ah
KK: \CF
# Uncheck ignore format
KK: \At\Ai\Ah
KK: \CF
-KK: \Axregexp-mode\[Return]\\}\[Return]
+KK: \C\[F20]\\}\[Return]
CP: Putting selection at .*idx: 0 par: 0 pos: 6\n with len: 1
Sleep 1
TestEnd
CP: Putting selection at .*idx: 0 par: 0 pos: 6\n with len: 1
Sleep 1
TestEnd
# Finding styles with regexp
# Finding styles with regexp
+UseShortcut "C-F20" "regexp-mode"
+PrepareShortcuts
Lang sk_SK.utf8
CO: findadv-re-04.ctrl
Lang sk_SK.utf8
CO: findadv-re-04.ctrl
KK: \CF
KK: \Ce
CN: Case insensitive, format not ignored .*
KK: \CF
KK: \Ce
CN: Case insensitive, format not ignored .*
-KK: \Axregexp-mode\[Return].*\[Return]
Cr: ^.*Putting
CP: Putting selection at .*idx: 0 par: 0 pos: 16\n with len: 9
Cr: ^.*Putting
Cr: ^.*Putting
CP: Putting selection at .*idx: 0 par: 0 pos: 16\n with len: 9
Cr: ^.*Putting
KK: \At\Ai\Ah
KK: \CF
KK: \Ce
KK: \At\Ai\Ah
KK: \CF
KK: \Ce
-KK: \Axregexp-mode\[Return]\\b[a-z]*\\b\[Return]\[Return]\[Return]
+KK: \C\[F20]\\b[a-z]*\\b\[Return]\[Return]\[Return]
Cr: ^.*Putting
CP: Putting selection at .*idx: 0 par: 0 pos: 16\n with len: 3
Cr: ^.*Putting
Cr: ^.*Putting
CP: Putting selection at .*idx: 0 par: 0 pos: 16\n with len: 3
Cr: ^.*Putting
KK: \At\Ai\Ah
KK: \CF
KK: \Ce
KK: \At\Ai\Ah
KK: \CF
KK: \Ce
-KK: \Az\[Tab]\Axregexp-mode\[Return][a-z]+\[Return]\[Return]\[Return]\[Return]
+KK: \Az\[Tab]\C\[F20][a-z]+\[Return]\[Return]\[Return]\[Return]
Cr: ^.*Putting
CP: Putting selection at .*idx: 0 par: 0 pos: 17\n with len: 2
Cr: ^.*Putting
Cr: ^.*Putting
CP: Putting selection at .*idx: 0 par: 0 pos: 17\n with len: 2
Cr: ^.*Putting
KK: \At\Ai\Ah
KK: \CF
KK: \Ce
KK: \At\Ai\Ah
KK: \CF
KK: \Ce
-KK: \Az\[Tab]\Axregexp-mode\[Return][A-Z]+\[Return]\[Return]\[Return]
+KK: \Az\[Tab]\C\[F20][A-Z]+\[Return]\[Return]\[Return]
Cr: ^.*Putting
CP: Putting selection at .*idx: 0 par: 0 pos: 16\n with len: 1
Cr: ^.*Putting
Cr: ^.*Putting
CP: Putting selection at .*idx: 0 par: 0 pos: 16\n with len: 1
Cr: ^.*Putting
# It will fail if the Italian translation changes, if "ignore format" is
# unchecked by default, or if the wrap-around mechanism changes (e.g. does not
# ask if the cursor started at the beginning of the buffer).
# It will fail if the Italian translation changes, if "ignore format" is
# unchecked by default, or if the wrap-around mechanism changes (e.g. does not
# ask if the cursor started at the beginning of the buffer).
+UseShortcut "C-F20" "regexp-mode"
+PrepareShortcuts
Lang it_IT.utf8
CO: findadv-re-05.ctrl
TestBegin test.lyx -dbg key,find > findadv-re-05.loga.txt 2>&1
KK: \Cm\\frac 1-x\[Down]1+x^2 \C\[Home]
KK: \CF
Lang it_IT.utf8
CO: findadv-re-05.ctrl
TestBegin test.lyx -dbg key,find > findadv-re-05.loga.txt 2>&1
KK: \Cm\\frac 1-x\[Down]1+x^2 \C\[Home]
KK: \CF
-KK: \Cm\\frac \Axregexp-mode\[Return].* \[Down]1+x^2 \[Return]
+KK: \Cm\\frac \C\[F20].* \[Down]1+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: raggiunta la fine cercando in avanti
TestEnd
Lang C
CP: raggiunta la fine cercando in avanti
TestEnd
Lang C
# Finding regexps within \frac{}
# Finding regexps within \frac{}
+UseShortcut "C-F20" "regexp-mode"
+PrepareShortcuts
Lang sk_SK.utf8
CO: findadv-re-06.ctrl
Lang sk_SK.utf8
CO: findadv-re-06.ctrl
# Uncheck ignore format (depends on IT language)
KK: \At\Ai\Ah
KK: \CF
# Uncheck ignore format (depends on IT language)
KK: \At\Ai\Ah
KK: \CF
-KK: \Cm\\frac \Axregexp-mode\[Return].* \[Down]1+x^2 \[Return]
+KK: \Cm\\frac \C\[F20].* \[Down]1+x^2 \[Return]
CP: Putting selection at .*idx: 0 par: 0 pos: 0\n .*idx: 0 par: 0 pos: 0\n with len: 1
TestEnd
Lang C
CP: Putting selection at .*idx: 0 par: 0 pos: 0\n .*idx: 0 par: 0 pos: 0\n with len: 1
TestEnd
Lang C