Revision: 3289
Author: janne.t.harkonen
Date: Mon May 17 02:43:30 2010
Log: Ignore multiple whitespace between words of cell
http://code.google.com/p/robotframework/source/detail?r=3289
Modified:
/trunk/src/robot/parsing/populator.py
/trunk/utest/parsing/test_populator.py
=======================================
--- /trunk/src/robot/parsing/populator.py Mon May 17 02:40:09 2010
+++ /trunk/src/robot/parsing/populator.py Mon May 17 02:43:30 2010
@@ -236,7 +236,7 @@
self._current_populator.add(cells)
def _data_cells(self, row):
- cells = [ c.strip() for c in row ]
+ cells = [ self._collapse_whitespace(c) for c in row ]
while cells and not cells[-1]:
cells.pop()
return cells
=======================================
--- /trunk/utest/parsing/test_populator.py Mon May 17 02:40:09 2010
+++ /trunk/utest/parsing/test_populator.py Mon May 17 02:43:30 2010
@@ -102,12 +102,13 @@
assert_equals(uk.return_.value, ['ankka', 'kameli'])
def test_whitespace_is_ignored(self):
- self._create_table('Test Cases', [['My test'],
+ self._create_table('Test Cases', [['My test'],
[' ', '[Tags]', 'foo', ' \t '],
[' '],
[ '\t'],
['', 'Log Many', '', 'argh']])
test = self._first_test()
+ assert_equals(test.name, 'My test')
assert_equals(test.tags.value, ['foo'])
self._number_of_steps_should_be(test, 1)