diff options
author | László Németh <nemeth@numbertext.org> | 2018-10-23 23:08:44 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2018-10-25 08:22:42 +0200 |
commit | 4712b830f82a1de6ce3d7dddbe80a0f83947b968 (patch) | |
tree | 093adb3ea36445f9243d2ee65090405930903aef /librelogo | |
parent | 8e8d89b27167a524d7e591d00e5d1ed20288c964 (diff) |
LibreLogo: add unit tests
for program running and command name expansion, and for following fixes:
tdf#106792: regression in line length and continuous line drawing
tdf#100941: line breaking by "magic wand"
tdf#120422: program lines are different paragraphs by "magic wand"
Also add function __is_alive__() to LibreLogo.py to check
LibreLogo program termination via XScript API.
Change-Id: If884b3fd608a6e8077be853eb2dd17fbdfff2011
Reviewed-on: https://gerrit.libreoffice.org/62263
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'librelogo')
-rw-r--r-- | librelogo/source/LibreLogo/LibreLogo.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/librelogo/source/LibreLogo/LibreLogo.py b/librelogo/source/LibreLogo/LibreLogo.py index 356ed97f551a..0dc5d7ea2ed7 100644 --- a/librelogo/source/LibreLogo/LibreLogo.py +++ b/librelogo/source/LibreLogo/LibreLogo.py @@ -516,6 +516,9 @@ class LogoProgram(threading.Thread): with __lock__: __thread__ = None +# to check LibreLogo program termination (in that case, return value is False) +def __is_alive__(): + return __thread__ != None def __encodestring__(m): __strings__.append(re.sub("\\[^\\]", "", m.group(2))) |