Revision: 3407
Author: janne.t.harkonen
Date: Mon May 24 03:39:01 2010
Log: test for empty for
http://code.google.com/p/robotframework/source/detail?r=3407

Modified:
 /trunk/utest/parsing/test_populator.py

=======================================
--- /trunk/utest/parsing/test_populator.py      Sun May 23 23:13:54 2010
+++ /trunk/utest/parsing/test_populator.py      Mon May 24 03:39:01 2010
@@ -1,5 +1,4 @@
 import unittest
-import os
 from StringIO import StringIO

 from robot.parsing.datareader import FromFilePopulator, DataRow
@@ -213,6 +212,14 @@
         assert_equals(for_loop.vars, ['${i}'])
         assert_equals(for_loop.items, ['10', '20', '30', '40', '50', '60'])

+    def test_for_loop_with_empty_body(self):
+        self._create_table('Test cases', [['For loop test'],
+ ['', ':FOR ', '${var}', 'IN', 'foo'],
+                                          ['', 'Log', 'outside FOR']])
+        test = self._first_test()
+        assert_equals(len(test.steps), 2)
+        assert_equals(test.steps[0].steps, [])
+
     def test_test_settings(self):
         doc = 'This is domumentation for the test case'
         self._create_table('Test cases', [['My test name'],

Reply via email to