Revision: 4114
Author: pekka.klarck
Date: Thu Sep 23 11:33:43 2010
Log: unescape \n, \t, and friends, issue 655
http://code.google.com/p/robotframework/source/detail?r=4114
Modified:
/trunk/tools/testdoc/test/testcases.html
/trunk/tools/testdoc/testdoc.py
=======================================
--- /trunk/tools/testdoc/test/testcases.html Thu May 6 03:01:28 2010
+++ /trunk/tools/testdoc/test/testcases.html Thu Sep 23 11:33:43 2010
@@ -70,7 +70,12 @@
<tbody>
<tr>
<td>Documentation </td>
-<td>This is documentation for test suite and it includes variables
${EXISTING}, ${NONEXISTING} and ${CURDIR}</td>
+<td>This is documentation for test suite and it includes variables
${EXISTING}, ${NONEXISTING} and ${CURDIR}.\n<br>
+We also have newlines, _formatting_, and even a cool table:\n<br>
+| *X* | *Y* |\n<br>
+| 1 | a |\n<br>
+| 2 | b |\n<br>
+</td>
<td></td>
<td></td>
<td></td>
@@ -126,7 +131,7 @@
</tr>
</thead>
<tbody>
-<tr><td>A Simple Test Case</td><td>[ Documentation ]</td><td>This is test
case doc ${VAR}</td><td></td><td></td></tr><tr><td></td><td>[ Tags
]</td><td>test</td><td></td><td></td></tr><tr>
+<tr><td>A Simple Test Case</td><td>[ Documentation ]</td><td>This is test
case doc with ${VAR}, t\ta\tb\ts, newlines\n and
_formatting_</td><td></td><td></td></tr><tr><td></td><td>[ Tags
]</td><td>test</td><td></td><td></td></tr><tr>
<td><br></td>
<td>Verify Environment</td>
<td>${ENV}</td>
=======================================
--- /trunk/tools/testdoc/testdoc.py Thu Jun 10 05:52:53 2010
+++ /trunk/tools/testdoc/testdoc.py Thu Sep 23 11:33:43 2010
@@ -150,6 +150,10 @@
self._write_metadata_row('Number of Tests', suite.get_test_count())
self._writer.end('table')
+ def _start_suite_or_test_metadata(self, suite_or_test):
+ suite_or_test.doc = utils.unescape(suite_or_test.doc)
+ LogSerializer._start_suite_or_test_metadata(self, suite_or_test)
+
def _write_test_metadata(self, test):
self._start_suite_or_test_metadata(test)
if test.timeout.secs < 0: