Revision: 3846
Author: pekka.klarck
Date: Wed Aug 18 05:22:12 2010
Log: Tests for continuing rows inside for loops. One of these tests reproduces the bug in issue 607 and thus fails the build.
http://code.google.com/p/robotframework/source/detail?r=3846

Modified:
 /trunk/atest/robot/parsing/multirow.txt
 /trunk/atest/testdata/parsing/multirow.txt

=======================================
--- /trunk/atest/robot/parsing/multirow.txt     Tue Aug 17 07:24:38 2010
+++ /trunk/atest/robot/parsing/multirow.txt     Wed Aug 18 05:22:12 2010
@@ -10,6 +10,9 @@

 Multirow Variables
     Check Test Case  ${TEST NAME}
+
+Multirow Import
+    Check Test Case  ${TEST NAME}

 Multirow Args For Library Keyword
     ${tc} =  Check Test Case  ${TEST NAME}
@@ -43,6 +46,9 @@

 Multirow With For Loop Declaration
     Check Test Case  ${TEST NAME}
+
+Multirow With For Loop Keywords
+    Check Test Case  ${TEST NAME}

 Invalid Multirow Usage
Check Multirow Error From Stderr Settings Non-existing setting '...'.
=======================================
--- /trunk/atest/testdata/parsing/multirow.txt  Tue Aug 17 07:24:38 2010
+++ /trunk/atest/testdata/parsing/multirow.txt  Wed Aug 18 05:22:12 2010
@@ -11,6 +11,8 @@
 ...
 ...           \   t7  t8
 ...           t9
+Library
+...  OperatingSystem


 *** Variables ***
@@ -46,6 +48,9 @@
     Should Be Equal  @{list}[2]  world
     Should Be Equal  @{list}[3]  !

+Multirow Import
+    Directory Should Exist  .
+
 Multirow Args For Library Keyword
     Log Many  one  two
     ...  three
@@ -101,20 +106,56 @@

 Multirow With For Loop Declaration
     ${result} =  Set Variable  ${EMPTY}
-    :FOR  ${item}  IN  a  b  c
-    ...                d  e
+    :FOR  ${item}  IN  a  b
+    ...                c
     \  ${result} =  Set Variable  ${result}${item}
-    Should Be Equal  ${result}  abcde
+    Should Be Equal  ${result}  abc
     :FOR
     ...  ${item}
     ...  IN
-    ...  e
-    ...  d
     ...  c
     ...  b
     \  ${result} =  Set Variable  ${result.replace('${item}', '')}
     Should Be Equal  ${result}  a
-
+    :FOR
+    ...  ${item}
+    ...  IN RANGE
+    ...  1
+    ...  2
+    \  ${result} =  Set Variable  ${result}${item}
+    Should Be Equal  ${result}  a1
+    :FOR  ${i1}  ${i2}  IN
+    ...   b      2
+    ...   c      3
+    \  ${result} =  Set Variable  ${result}${i1}${i2}
+    Should Be Equal  ${result}  a1b2c3
+    :FOR  ${item}  IN
+    \  ...  a  b  c
+    \  ${result} =  Set Variable  ${result.replace('${item}', '')}
+    Should Be Equal  ${result}  123
+    :FOR  ${item}  IN RANGE  1
+    \  ...  4
+    \  ${result} =  Set Variable  ${result.replace('${item}', '')}
+    Should Be Equal  ${result}  ${EMPTY}
+
+Multirow With For Loop Keywords
+    ${result} =  Set Variable  ${EMPTY}
+    :FOR  ${item}  IN  a  b  c
+    \  ${item} =  Set Variable
+    \  ...  ${item.upper()}
+    \  ${result} =  Set Variable
+    ...  ${result}${item}
+    \    ${x} =
+    ...  Catenate
+    ...     1  2  3
+    \  ...  a
+    \  ...     b
+    \  ...        ${item.lower()}
+    Should Be Equal  ${result}  ABC
+    Should Be Equal  ${x}  1 2 3 a b c
+
+
+

 *** Keywords ***
 \    # Invalid usage

Reply via email to