Revision: 3173
Author: janne.t.harkonen
Date: Wed May 5 03:26:47 2010
Log: tests for cutting messages when multiple errors occur in same test
http://code.google.com/p/robotframework/source/detail?r=3173
Modified:
/trunk/atest/robot/running/long_error_messages.txt
/trunk/atest/testdata/running/long_error_messages.txt
=======================================
--- /trunk/atest/robot/running/long_error_messages.txt Wed May 5 03:26:36
2010
+++ /trunk/atest/robot/running/long_error_messages.txt Wed May 5 03:26:47
2010
@@ -27,6 +27,17 @@
Has Been Cut 400 x 7 Message Over The Limit 1201.*${3DOTS}
${3DOTS}.*END
Has Been Cut 3121 x 1 Message Over The Limit .*${3DOTS}\\n
${3DOTS}.*\\n
+Multiple Errors
+ ${test} = Get Test Case ${TESTNAME}
+ Should Be Equal ${test.message.count('\n')} ${40}
+
+Two long errors
+ ${test} = Get Test Case ${TESTNAME}
+ Should Be Equal ${test.message.count('\n')} ${40}
+ Should Be True ${test.message.startswith('Several failures
occurred:\n\n1) ContinuableApocalypseException: 1')}
+ Should Be True
${test.message.endswith('1961~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~2000')}
+
+
*** Keywords ***
Has Been Cut
[Arguments] ${testname} ${eol_dots}= ${bol_dots}=
=======================================
--- /trunk/atest/testdata/running/long_error_messages.txt Wed May 5
03:26:36 2010
+++ /trunk/atest/testdata/running/long_error_messages.txt Wed May 5
03:26:47 2010
@@ -1,4 +1,5 @@
*** Settings ***
+Library Exceptions
*** Test Cases ***
50 X 1 Message Under The Limit
@@ -34,6 +35,16 @@
3121 X 1 Message Over The Limit
Fail With Long Message 3121 1
+Multiple errors
+ :FOR ${index} IN RANGE 1 100
+ \ Raise Continuable Failure Failure number ${index}
+
+Two long errors
+ ${err}= Get Long Message 40 50
+ Raise Continuable Failure ${err}
+ Raise Continuable Failure ${err.replace(' ', '~')}
+
+
*** Keywords ***
Fail With Long Message
[Arguments] ${line_length}=80 ${line_count}=1