Kaydet (Commit) b0f75956 authored tarafından Eike Rathke's avatar Eike Rathke

Correct a test that worked only by chance, tdf#91758 follow-up

... but now doesn't anymore.

Change-Id: I573bdda023c69b895afe9959f345fc0e6d862cf8
üst e63e3e37
...@@ -498,16 +498,16 @@ class CheckTable(unittest.TestCase): ...@@ -498,16 +498,16 @@ class CheckTable(unittest.TestCase):
xDoc.Text.insertTextContent(xCursor, xTable, False) xDoc.Text.insertTextContent(xCursor, xTable, False)
xDispatcher.executeDispatch(xDocFrame, '.uno:GoToStartOfDoc', '', 0, ()) xDispatcher.executeDispatch(xDocFrame, '.uno:GoToStartOfDoc', '', 0, ())
xDispatcher.executeDispatch(xDocFrame, '.uno:InsertText', '', 0, xDispatcher.executeDispatch(xDocFrame, '.uno:InsertText', '', 0,
(PropertyValue('Text', 0, '15-10-30', 0),)) (PropertyValue('Text', 0, '2015-10-30', 0),))
xDispatcher.executeDispatch(xDocFrame, '.uno:JumpToNextCell', '', 0, ()) xDispatcher.executeDispatch(xDocFrame, '.uno:JumpToNextCell', '', 0, ())
# Without number recognition 15-10-30 should not be interpreted as a date # Without number recognition 2015-10-30 should not be interpreted as a date
self.assertEqual(xTable.getCellByPosition(0, 0).getString(), '15-10-30') self.assertEqual(xTable.getCellByPosition(0, 0).getString(), '2015-10-30')
self.assertEqual(xTable.getCellByPosition(0, 0).getValue(), 0) self.assertEqual(xTable.getCellByPosition(0, 0).getValue(), 0)
# Activate number recognition # Activate number recognition
xDispatcher.executeDispatch(xDocFrame, '.uno:TableNumberRecognition', '', 0, xDispatcher.executeDispatch(xDocFrame, '.uno:TableNumberRecognition', '', 0,
(PropertyValue('TableNumberRecognition', 0, True, 0),)) (PropertyValue('TableNumberRecognition', 0, True, 0),))
xDispatcher.executeDispatch(xDocFrame, '.uno:InsertText', '', 0, xDispatcher.executeDispatch(xDocFrame, '.uno:InsertText', '', 0,
(PropertyValue('Text', 0, '15-10-30', 0),)) (PropertyValue('Text', 0, '2015-10-30', 0),))
xDispatcher.executeDispatch(xDocFrame, '.uno:JumpToNextCell', '', 0, ()) xDispatcher.executeDispatch(xDocFrame, '.uno:JumpToNextCell', '', 0, ())
# With number recognition it should now be a date, confirm by checking # With number recognition it should now be a date, confirm by checking
# the string and value of the cell. # the string and value of the cell.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment