summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2019-04-17 00:37:54 +0200
committerLászló Németh <nemeth@numbertext.org>2019-05-08 08:50:20 +0200
commitf0df42abd89f52abdafca0479c2bf63a5868ec9f (patch)
treefb577171748bfe2ba931c5ecea60b98d717dfdad /sw/qa
parent905634202afe1d8562ae321909a40ff6117af2ad (diff)
LibreLogo: fix RANGE with a single function argument
in a FOR loop, by removing the range(x,,)-like double commas in this case, too, during program compilation. Previous empty (missing) argument of RANGE was checked by the terminating comma, but it can be a white space after it, as in the following example: FOR i IN RANGE COUNT 'letter' [ PRINT i ] Change-Id: I67d0a4f089be06f30003d1b979b8f1801dbfa2e9 Reviewed-on: https://gerrit.libreoffice.org/71263 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 0718458f1ae80c798c13400fd87c989faba01937) Reviewed-on: https://gerrit.libreoffice.org/71326
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/uitest/librelogo/compile.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/sw/qa/uitest/librelogo/compile.py b/sw/qa/uitest/librelogo/compile.py
index 28905a36b897..89e538b8c926 100644
--- a/sw/qa/uitest/librelogo/compile.py
+++ b/sw/qa/uitest/librelogo/compile.py
@@ -74,6 +74,7 @@ class LibreLogoCompileTest(UITestCase):
("WHILE REPCOUNT < 10 [ ]", "REPCOUNT2 = 1\nwhile REPCOUNT2 < 10 :\n __checkhalt__()\n REPCOUNT = REPCOUNT2\n REPCOUNT2 += 1"),
# for
("FOR i in [1, 2, 3] [ ]", "REPCOUNT4 = 1\nfor i in [1, 2, 3] :\n __checkhalt__()\n REPCOUNT = REPCOUNT4\n REPCOUNT4 += 1"),
+ ("FOR i IN RANGE COUNT 'letters' [ ]", "REPCOUNT6 = 1\nfor i in range(len(u'letters'),) :\n __checkhalt__()\n REPCOUNT = REPCOUNT6\n REPCOUNT6 += 1"),
# PROCEDURE
("TO x\nLABEL 2\nEND", "global x\ndef x():\n __checkhalt__()\n %s\n label(2)\n %s" % (((self.LS),)*2)),
# FUNCTION