Changing *-in.txt due to erroneous shortcuts in it.po
keytest.py, single-test.cmake and CMakeLists.txt now
provide a frontend hint for xvkbd.
17 files changed:
-DLYX_USERDIR_VER=${LYX_USERDIR_VER}
-DKEYTEST_OUTFILE=${_t}-out.txt
-DPACKAGE=${PACKAGE}
-DLYX_USERDIR_VER=${LYX_USERDIR_VER}
-DKEYTEST_OUTFILE=${_t}-out.txt
-DPACKAGE=${PACKAGE}
+ -DFRONTEND=${LYX_USE_QT}
-DLOCALE_DIR=${LOCALE_DIR}
-P ${TOP_SRC_DIR}/development/autotests/single-test.cmake)
settestlabel(keytest/${_t} "key")
-DLOCALE_DIR=${LOCALE_DIR}
-P ${TOP_SRC_DIR}/development/autotests/single-test.cmake)
settestlabel(keytest/${_t} "key")
# Basic test for format-aware searching
#
# Basic test for format-aware searching
#
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: foo \Cefoo foo\Ce foo\C\[Home]
KK: \Cs
KK: \CF
# Uncheck ignore format
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: foo \Cefoo foo\Ce foo\C\[Home]
KK: \Cs
KK: \CF
# Uncheck ignore format
KK: \Ce
KK: foo\[Return]
TestEnd
Lang C
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 4\n with len: 3' lyx-log.txt
KK: \Ce
KK: foo\[Return]
TestEnd
Lang C
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
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \CF
# Uncheck ignore format
KK: \Ce
KK: foo\[Return]\[Return]
TestEnd
KK: \Ce
KK: foo\[Return]\[Return]
TestEnd
# Test for searching with regular expressions
# Test for searching with regular expressions
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \Apb
KK: one\[Return]
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \Apb
KK: one\[Return]
KK: \Cs
KK: \CF
# Uncheck ignore format
KK: \Cs
KK: \CF
# Uncheck ignore format
KK: \Apb
KK: \Axregexp-mode\[Return][a-z]* \[Return]
TestEnd
Lang C
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 0\n with len: 3' lyx-log.txt
KK: \Apb
KK: \Axregexp-mode\[Return][a-z]* \[Return]
TestEnd
Lang C
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
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \CF
# Uncheck ignore format
KK: \Apb
KK: \Axregexp-mode\[Return][a-z]* \[Return]\[Return]
TestEnd
KK: \Apb
KK: \Axregexp-mode\[Return][a-z]* \[Return]\[Return]
TestEnd
# Test for searching the special LyX and LaTeX words
# when ignoring format
# Test for searching the special LyX and LaTeX words
# when ignoring format
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: This is LyX,\[Return]
KK: a WYSIWYG LaTeX editor.\C\[Home]
KK: \Cs
KK: \CF
# Uncheck ignore format (depends on IT language)
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: This is LyX,\[Return]
KK: a WYSIWYG LaTeX editor.\C\[Home]
KK: \Cs
KK: \CF
# Uncheck ignore format (depends on IT language)
KK: LyX\[Return]
TestEnd
Lang C
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 8\n with len: 3' lyx-log.txt
KK: LyX\[Return]
TestEnd
Lang C
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 8\n with len: 3' lyx-log.txt
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \CF
# Uncheck ignore format
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \CF
# Uncheck ignore format
KK: LaTeX\[Return]
TestEnd
Lang C
KK: LaTeX\[Return]
TestEnd
Lang C
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' lyx-log.txt
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' lyx-log.txt
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \C\[Home]
KK: \CF
# Uncheck ignore format
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \C\[Home]
KK: \CF
# Uncheck ignore format
KK: \Cm
KK: v\[Return]
TestEnd
KK: \Cm
KK: v\[Return]
TestEnd
# Finding displayed maths with ignore-format on&off (might affect #7596)
#
# Finding displayed maths with ignore-format on&off (might affect #7596)
#
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \Axmath-display\[Return]
KK: x^2 +x^2\C\[Home]
KK: \Cs
KK: \CF
# Uncheck ignore format
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \Axmath-display\[Return]
KK: x^2 +x^2\C\[Home]
KK: \Cs
KK: \CF
# Uncheck ignore format
KK: \Axmath-display\[Return]
KK: x^2\[Return]
TestEnd
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' lyx-log.txt
KK: \Axmath-display\[Return]
KK: x^2\[Return]
TestEnd
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' lyx-log.txt
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \CF
# Uncheck ignore format
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \CF
# Uncheck ignore format
KK: \Axmath-display\[Return]
KK: x^2\[Return]\[Return]
TestEnd
KK: \Axmath-display\[Return]
KK: x^2\[Return]\[Return]
TestEnd
# Finding numbered maths with ignore-format on&off (might affect #7596)
#
# Finding numbered maths with ignore-format on&off (might affect #7596)
#
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \CM\Axmath-number-toggle\[Return]
KK: x^2 +x^2\C\[Home]
KK: \Cs
KK: \CF
# Uncheck ignore format
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \CM\Axmath-number-toggle\[Return]
KK: x^2 +x^2\C\[Home]
KK: \Cs
KK: \CF
# Uncheck ignore format
KK: \CM\Axmath-number-toggle\[Return]
KK: x^2\[Return]
TestEnd
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' lyx-log.txt
KK: \CM\Axmath-number-toggle\[Return]
KK: x^2\[Return]
TestEnd
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' lyx-log.txt
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \CF
# Uncheck ignore format
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \CF
# Uncheck ignore format
KK: \CM\Axmath-number-toggle\[Return]
KK: x^2\[Return]\[Return]
TestEnd
KK: \CM\Axmath-number-toggle\[Return]
KK: x^2\[Return]\[Return]
TestEnd
# Verify matches in *-environments with ignore-format off
# (gather environment comes in the *-form after mutate)
#
# Verify matches in *-environments with ignore-format off
# (gather environment comes in the *-form after mutate)
#
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \CM\Axmath-mutate gather\[Return]
KK: x^2 +x^2\C\[Home]
KK: \Cs
KK: \CF
# Uncheck ignore format
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \CM\Axmath-mutate gather\[Return]
KK: x^2 +x^2\C\[Home]
KK: \Cs
KK: \CF
# Uncheck ignore format
KK: \CM\Axmath-mutate gather\[Return]
KK: x^2\[Return]
TestEnd
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' lyx-log.txt
KK: \CM\Axmath-mutate gather\[Return]
KK: x^2\[Return]
TestEnd
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' lyx-log.txt
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \CF
# Uncheck ignore format
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \CF
# Uncheck ignore format
KK: \CM\Axmath-mutate gather\[Return]
KK: x^2\[Return]\[Return]
TestEnd
KK: \CM\Axmath-mutate gather\[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: 1\n with len: 2' lyx-log.txt
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' lyx-log.txt
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \CF
# Uncheck ignore format
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \CF
# Uncheck ignore format
KK: \Cm\\beta\\alpha \[Return]
TestEnd
Lang C
KK: \Cm\\beta\\alpha \[Return]
TestEnd
Lang C
Lang C
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 1\n with len: 1' lyx-log.txt
#
Lang C
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 1\n with len: 1' lyx-log.txt
#
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \CF
# Uncheck ignore format
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \CF
# Uncheck ignore format
KK: \Axregexp-mode\[Return]\\(\[Return]
TestEnd
Lang C
KK: \Axregexp-mode\[Return]\\(\[Return]
TestEnd
Lang C
Lang C
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 3\n with len: 1' lyx-log.txt
#
Lang C
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 3\n with len: 1' lyx-log.txt
#
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \CF
# Uncheck ignore format
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \CF
# Uncheck ignore format
KK: \Axregexp-mode\[Return]\\[\[Return]
TestEnd
Lang C
KK: \Axregexp-mode\[Return]\\[\[Return]
TestEnd
Lang C
Lang C
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 0\n with len: 1' lyx-log.txt
#
Lang C
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
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \CF
# Uncheck ignore format
KK: \Axregexp-mode\[Return]\\\\\[Return]
TestEnd
Lang C
KK: \Axregexp-mode\[Return]\\\\\[Return]
TestEnd
Lang C
Lang C
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 7\n with len: 1' lyx-log.txt
#
Lang C
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
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \CF
# Uncheck ignore format
KK: \Axregexp-mode\[Return]%\[Return]
TestEnd
Lang C
KK: \Axregexp-mode\[Return]%\[Return]
TestEnd
Lang C
Lang C
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 8\n with len: 1' lyx-log.txt
#
Lang C
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
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \CF
# Uncheck ignore format
KK: \Axregexp-mode\[Return]\\^\[Return]
TestEnd
Lang C
KK: \Axregexp-mode\[Return]\\^\[Return]
TestEnd
Lang C
Lang C
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 5\n with len: 1' lyx-log.txt
#
Lang C
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 5\n with len: 1' lyx-log.txt
#
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \CF
# Uncheck ignore format
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \CF
# Uncheck ignore format
KK: \Axregexp-mode\[Return]\\{\[Return]
TestEnd
Lang C
KK: \Axregexp-mode\[Return]\\{\[Return]
TestEnd
Lang C
Lang C
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 6\n with len: 1' lyx-log.txt
#
Lang C
Assert pcregrep -M 'Putting selection at .*idx: 0 par: 0 pos: 6\n with len: 1' lyx-log.txt
#
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \CF
# Uncheck ignore format
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \CF
# Uncheck ignore format
KK: \Axregexp-mode\[Return]\\}\[Return]
TestEnd
Lang C
KK: \Axregexp-mode\[Return]\\}\[Return]
TestEnd
Lang C
# Finding styles with regexp
# Finding styles with regexp
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: Hello \CeHello\C\[Home]
KK: \Cs
KK: \CF
# Uncheck ignore format (depends on IT language)
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: Hello \CeHello\C\[Home]
KK: \Cs
KK: \CF
# Uncheck ignore format (depends on IT language)
KK: \Ce\Axregexp-mode\[Return].*\[Return]
TestEnd
Lang C
KK: \Ce\Axregexp-mode\[Return].*\[Return]
TestEnd
Lang C
# Finding regexps within \frac{}
# Finding regexps within \frac{}
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \Cm\\frac 1-x\[Down]1+x^2 \C\[Home]
KK: \CF
# Uncheck ignore format (depends on IT language)
TestBegin test.lyx -dbg find > lyx-log.txt 2>&1
KK: \Cm\\frac 1-x\[Down]1+x^2 \C\[Home]
KK: \CF
# Uncheck ignore format (depends on IT language)
KK: \Cm\\frac \Axregexp-mode\[Return].* \[Down]1+x^2 \[Return]
TestEnd
Lang C
KK: \Cm\\frac \Axregexp-mode\[Return].* \[Down]1+x^2 \[Return]
TestEnd
Lang C
# LaTeX, and verifies that the typed characters are indeed present in the
# exported document.
#
# LaTeX, and verifies that the typed characters are indeed present in the
# exported document.
#
-TestBegin test.lyx > lyx-log.txt 2>&1
+TestBegin test.lyx -dbg key > lyx-log.txt 2>&1
-KK: \Ax
-KK: buffer-export latex\[Return]
+KK: \Axbuffer-export latex\[Return]
TestEnd grep "Hello World" test.tex
TestEnd grep "Hello World" test.tex
actual_delay = key_delay
if actual_delay == '':
actual_delay = def_delay
actual_delay = key_delay
if actual_delay == '':
actual_delay = def_delay
- if not xvkbd_hacked:
- subprocess.call([xvkbd_exe, "-xsendevent", "-window", lyx_window_name,
- "-delay", actual_delay, "-text", keystr], stdout = FNULL, stderr = FNULL)
+ xvpar = [xvkbd_exe]
+ if qt_frontend == 'QT5':
+ xvpar.extend(["-no-jump-pointer"])
- subprocess.call([xvkbd_exe, "-no_root", "-wait_idle", lyx_pid,
- "-xsendevent", "-window", lyx_window_name,
- "-delay", actual_delay, "-text", keystr], stdout = FNULL, stderr = FNULL)
+ xvpar.extend(["-xsendevent"])
+ if xvkbd_hacked:
+ xvpar.extend(["-wait_idle", lyx_pid])
+ xvpar.extend(["-window", lyx_window_name, "-delay", actual_delay, "-text", keystr])
+
+ subprocess.call(xvpar, stdout = FNULL, stderr = FNULL)
def system_retry(num_retry, cmd):
i = 0
rtn = intr_system(cmd)
while ( ( i < num_retry ) and ( rtn != 0) ):
i = i + 1
def system_retry(num_retry, cmd):
i = 0
rtn = intr_system(cmd)
while ( ( i < num_retry ) and ( rtn != 0) ):
i = i + 1
time.sleep(1)
if ( rtn != 0 ):
print "Command Failed: "+cmd
time.sleep(1)
if ( rtn != 0 ):
print "Command Failed: "+cmd
xvkbd_exe = "xvkbd"
xvkbd_hacked = os.environ.get('XVKBD_HACKED') != None
xvkbd_exe = "xvkbd"
xvkbd_hacked = os.environ.get('XVKBD_HACKED') != None
+qt_frontend = os.environ.get('QT_FRONTEND')
+if qt_frontend is None:
+ qt_frontend = 'QT4'
locale_dir = os.environ.get('LOCALE_DIR')
if locale_dir is None:
locale_dir = os.environ.get('LOCALE_DIR')
if locale_dir is None:
# -DLOCALE_DIR=xxx \
# -DPO_BUILD_DIR=xxx \
# -DPACKAGE=xxx \
# -DLOCALE_DIR=xxx \
# -DPO_BUILD_DIR=xxx \
# -DPACKAGE=xxx \
# -P ${AUTOTEST_ROOT}/single-test.cmake
set(KEYTEST "${AUTOTEST_ROOT}/keytest.py")
# -P ${AUTOTEST_ROOT}/single-test.cmake
set(KEYTEST "${AUTOTEST_ROOT}/keytest.py")
else()
set(XVKBD_EXE "/usr/bin/xvkbd")
endif()
else()
set(XVKBD_EXE "/usr/bin/xvkbd")
endif()
+set(ENV{QT_FRONTEND} ${FRONTEND})
if(EXISTS "${LYX_TESTS_USERDIR}/session")
execute_process(COMMAND ${CMAKE_COMMAND} -E remove -f "${LYX_TESTS_USERDIR}/session")
if(EXISTS "${LYX_TESTS_USERDIR}/session")
execute_process(COMMAND ${CMAKE_COMMAND} -E remove -f "${LYX_TESTS_USERDIR}/session")