Revision: 3494
Author: pekka.klarck
Date: Tue May 25 06:17:16 2010
Log: format + fix after metadata handling changes
http://code.google.com/p/robotframework/source/detail?r=3494

Added:
 /trunk/atest/robot/output/html_formatting.txt
Deleted:
 /trunk/atest/robot/output/html_formatting.html

=======================================
--- /dev/null
+++ /trunk/atest/robot/output/html_formatting.txt       Tue May 25 06:17:16 2010
@@ -0,0 +1,105 @@
+*** Settings ***
+Suite Setup     My Setup
+Force Tags      regression  pybot  jybot
+Resource        atest_resource.txt
+
+*** Variables ***
+${LOG}      Set in My Setup
+${REPORT}   ------ii-------
+${SUMMARY}  ------ii-------
+
+*** Test Cases ***
+Suite Documentation
+    Should Be Equal  ${SUITE.status}  PASS
+    ${doc} =  Catenate  SEPARATOR=\n
+ ... Test cases demonstrating html formatting of suite and test docs and suite metadata.<br />
+    ...  <br />
+ ... It is possible to format text with <b>bold</b>, <i>italic</i> and <i><b>bold italic</b></i>. Also links like <a href="http://basso.fi/radio";>http://basso.fi/radio</a>, <a href="ftp://funet.fi";>ftp://funet.fi</a> and <a href="file:///c:/temp">file:///c:/temp</a> are automatically formatted.<br /> + ... Image links like <img src="http://server/image.jpg"; title="http://server/image.jpg"; style="border: 1px solid gray" /> even create images.<br /> + ... Furthermore tables and horizontal rulers are available as seen by examples below.<br />
+    ...  <br />\n<hr />\n<br />
+    ...  <table border="1" class="doc">
+ ... <tr>\n<td><b>a</b></td>\n<td><b>b</b></td>\n<td><b>c</b></td>\n</tr>
+    ...  <tr>\n<td><i>1</i></td>\n<td>xx</td>\n<td>yy</td>\n</tr>
+    ...  <tr>\n<td><i>2</i></td>\n<td>zz</td>\n<td></td>\n</tr>
+    ...  </table>
+    ...  <br />\n<hr />
+    ...  There was a bug handling " in the end of suite doc: "
+    Should Contain  ${log}  ${doc}
+    Comment  1)  Suite doc in log
+ Should Contain ${LOG} <tr><th>Full Name:</th><td>Html Formatting</td></tr>\n <tr><th>Documentation:</th><td>${doc}</td></tr>
+    Comment  2)  Suite doc in report
+ Should Contain ${REPORT} Html Formatting</a></td>\n <td class="col_doc">${doc}</td>
+    Comment  3)  Summary info in report
+ Should Contain ${REPORT} <tr><th>Documentation:</th><td>${doc}</td></tr>
+    Comment  4)  Summary info in summary
+ Should Contain ${SUMMARY} <tr><th>Documentation:</th><td>${doc}</td></tr>
+
+Suite Metadata In Log
+ Should Contain ${LOG} <tr><th>Bold:</th><td>Text in <b>bold</b>.</td></tr> + Should Match Regexp ${LOG} <tr><th>Image Link:</th><td><img src="file://.*[/\\\\]robot\\.bmp" title="file://.*[/\\\\]robot\\.bmp" style="border: 1px solid gray" /></td></tr> + Should Contain ${LOG} <tr><th>Italic:</th><td><i>Italic text</i></td></tr> + Should Contain ${LOG} <tr><th>Link:</th><td><a href="http://x";>http://x</a>, <a href="https://y.z";>https://y.z</a></td></tr> + Should Contain ${LOG} <tr><th>Link2:</th><td><a href="http://xxx";>http://xxx</a></td></tr>
+
+Suite Metadata In Report
+ Should Contain ${REPORT} <span class="meta_name">Bold: </span>\nText in <b>bold</b>.<br /> + Should Match Regexp ${REPORT} <span class="meta_name">Image Link: </span>\n<img src="file://.*[/\\\\]robot\\.bmp" title="file://.*[/\\\\]robot\\.bmp" style="border: 1px solid gray" /><br /> + Should Contain ${REPORT} <span class="meta_name">Italic: </span>\n<i>Italic text</i><br /> + Should Contain ${REPORT} <span class="meta_name">Link: </span>\n<a href="http://x";>http://x</a>, <a href="https://y.z";>https://y.z</a><br /> + Should Contain ${REPORT} <span class="meta_name">Link2: </span>\n<a href="http://xxx";>http://xxx</a><br />
+
+Summary Info In Report
+ Should Contain ${REPORT} <tr><th>Bold:</th><td>Text in <b>bold</b>.</td></tr> + Should Match Regexp ${REPORT} <tr><th>Image Link:</th><td><img src="file://.*[/\\\\]robot\\.bmp" title="file://.*[/\\\\]robot\\.bmp" style="border: 1px solid gray" /></td></tr> + Should Contain ${REPORT} <tr><th>Italic:</th><td><i>Italic text</i></td></tr> + Should Contain ${REPORT} <tr><th>Link:</th><td><a href="http://x";>http://x</a>, <a href="https://y.z";>https://y.z</a></td></tr> + Should Contain ${REPORT} <tr><th>Link2:</th><td><a href="http://xxx";>http://xxx</a></td></tr>
+
+Summary Info In Summary
+ Should Contain ${SUMMARY} <tr><th>Bold:</th><td>Text in <b>bold</b>.</td></tr> + Should Match Regexp ${SUMMARY} <tr><th>Image Link:</th><td><img src="file://.*[/\\\\]robot\\.bmp" title="file://.*[/\\\\]robot\\.bmp" style="border: 1px solid gray" /></td></tr> + Should Contain ${SUMMARY} <tr><th>Italic:</th><td><i>Italic text</i></td></tr> + Should Contain ${SUMMARY} <tr><th>Link:</th><td><a href="http://x";>http://x</a>, <a href="https://y.z";>https://y.z</a></td></tr> + Should Contain ${SUMMARY} <tr><th>Link2:</th><td><a href="http://xxx";>http://xxx</a></td></tr>
+
+Bold
+    Check Test Documentation  Bold  <b>Bold</b>
+
+Italic
+    Check Test Documentation  Italic  <i>This is italic</i> and this is not
+
+Bold Italic
+ Check Test Documentation Bold Italic <i><b>Bold italic</b>, only italic</i> and no formatting
+
+Link
+ Check Test Documentation Link For more info see: <a href="http://some.url/";>http://some.url/</a>
+
+Image Link
+ Check Test Documentation Image Link "<img src="file://path/image.GIF" title="file://path/image.GIF" style="border: 1px solid gray" />" (<img src="http://s/x.PnG"; title="http://s/x.PnG"; style="border: 1px solid gray" />) <img src="https://i.jpeg"; title="https://i.jpeg"; style="border: 1px solid gray" />!!
+
+Table
+ Check Test Documentation Table <table border="1" class="doc">\n <tr>\n <td><b>a</b></td>\n <td><b>b</b></td>\n <td><b>c</b></td>\n </tr>\n <tr>\n <td><i>1</i></td>\n <td>xx</td>\n <td>yy</td>\n </tr>\n <tr>\n <td><i>2</i></td>\n <td>zz</td>\n <td></td>\n </tr>\n </table>\n
+
+Horizontal Ruler
+ Check Test Documentation Horizontal Ruler <hr />\n Horizontal rulers rule<br />\n <hr />\n
+
+Normal Usage
+ [Documentation] Using documentation in more realistic manner like normal user could use it + Check Test Documentation Normal Usage <b>Header</b><br />\n <br />\n This test case is <i>an example</i>. It tries to be use formatting in a manner normal users would use it.<br />\n <br />\n <b>Another Header</b><br />\n <br />\n Here's some more text about something. See <a href="http://something/else";>http://something/else</a> for more details.<br />\n <br />\n <b>Final Header</b><br />\n <br />\n 1. Point one<br />\n 2. Point two<br />\n 3. Piste kolme
+
+*** Keywords ***
+My Setup
+ Run Tests --log html_formatting-log.html --report html_formatting-report.html --summary html_formatting-summary.html --metadata Link2:http://xxx output/html_formatting.html
+    ${LOG} =  Get File  ${OUTDIR}${/}html_formatting-log.html
+    ${REPORT} =  Get File  ${OUTDIR}${/}html_formatting-report.html
+    ${SUMMARY} =  Get File  ${OUTDIR}${/}html_formatting-summary.html
+    Set Suite Variable  \${LOG}
+    Set Suite Variable  \${REPORT}
+    Set Suite Variable  \${SUMMARY}
+
+Check Test Documentation
+    [Arguments]  ${test}  ${doc}
+    Check Test Case  ${test}
+ Should Contain ${LOG} <tr><th>Full Name:</th><td>Html Formatting.${test}</td></tr>\n <tr><th>Documentation:</th><td>${doc}</td></tr> + Should Contain ${REPORT} >${test}</a></td>\n <td class="col_doc">${doc}</td>
=======================================
--- /trunk/atest/robot/output/html_formatting.html      Mon Apr 12 05:17:10 2010
+++ /dev/null
@@ -1,3304 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html><head>
-
-
-
-
-
-
-
-
-
-
-
-  <meta name="generator" content="HTML Tidy, see www.w3.org">
-
-
-
-
-
-
-
-
-
-
-
-  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
-
-
-
-
-
-
-
-
-
-
-
-  <style type="text/css">
-html { font-family: Arial,Helvetica,sans-serif;
-background-color: white;
-color: black;
-}
-p { max-width: 60em;
-}
-table { border-collapse: collapse;
-empty-cells: show;
-margin: 1em 0em;
-border: 0.1em solid black;
-}
-th, td {
-border-style: solid;
-border-width: 0.05em 0.1em;
-border-color: black;
-padding: 0.1em 0.2em;
-height: 1.5em;
-}
-th {
-background-color: rgb(192, 192, 192);
-color: black;
-border-width: 0.1em;
-font-weight: bold;
-text-align: center;
-text-transform: capitalize;
-letter-spacing: 0.1em;
-}
-/* Widths of named columns */
-col.name {
-width: 10em;
-}
-.action , .value, .arg {
-width: 15em;
-}
-/* Properties for the name column - td:first-child should work in CSS 2.1 avare browsers (tested in Firefox)
-- col.name is against specs but works in IE
-*/
-td:first-child, col.name {
-background-color: rgb(240, 240, 240);
-text-transform: capitalize;
-letter-spacing: 0.1em;
-}
-th { font-style: normal; } /* required for IE */
-/* Properties for the action column
-- td+td and td+td+td is for CSS 2.1 browsers (tested in Firefox)
-- col.action is for IE
-NOTE: Not used currently because in CSS 2.1 browsers td+td matches the
-first value column of Setting and Variable tables.
-td + td {
-background-color: rgb(240, 240, 240);
-}
-td + td + td {
-background: transparent;
-}
-col.action { /* can't be on the same line as td+td */
-background-color: rgb(240, 240, 240);
-}
-*/
-
-  </style>
-
-
-
-
-
-
-
-
-
-
-
-
-
- <title>Logging Tests</title><link rel="stylesheet" href="resources/css/testdata.css" type="text/css"></head>
-<body>
-
-
-
-
-
-
-<h1>Logging Tests</h1>
-
-
-
-
-
-
-
-<table border="1">
-
-
-
-
-
-
- <colgroup span="99"><col class="name"><col class="value" span="4"></colgroup>
-
-  <thead>
-  <tr>
-
-
-
-
-
-
-    <th>Setting</th>
-
-
-
-
-
-
-    <th>Value</th>
-
-
-
-
-
-
-    <th>Value</th>
-
-
-
-
-
-
-    <th>value</th>
-
-
-
-
-
-
-    <th>Value</th>
-
-
-
-
-
-
-  </tr>
-
-
-
-
-
-
-  </thead>
-
-  <tbody>
-
-
-
-
-
-
-    <tr>
-
-
-
-
-
-
-      <td>Resource</td>
-
-
-
-
-
-
-      <td>atest_resource.txt</td>
-
-
-
-
-
-
-      <td></td>
-
-
-
-
-
-
-      <td></td>
-
-
-
-
-
-
-      <td></td>
-
-
-
-
-
-
-    </tr>
-
-
-
-
-
-
-
-    <tr>
-
-
-
-
-
-
-      <td>Force Tags</td>
-
-
-
-
-
-
-      <td>regression</td>
-
-
-
-
-
-
-      <td>pybot</td>
-
-
-
-
-
-
-      <td>jybot</td>
-
-
-
-
-
-
-      <td></td>
-
-
-
-
-
-
-    </tr>
-
-
-
-
-
-
-
-    <tr>
-
-
-
-
-
-
-      <td>Suite Setup</td>
-
-
-
-
-
-
-      <td>My Setup</td>
-
-
-
-
-
-
-      <td></td>
-
-
-
-
-
-
-      <td></td>
-
-
-
-
-
-
-      <td></td>
-
-
-
-
-
-
-    </tr>
-
-
-
-
-
-
-
-
-
-
-
-  </tbody>
-</table>
-
-
-
-
-
-
-
-
-
-
-
-<table border="1">
-
-
-
-
-
-
- <colgroup span="99"><col class="name"><col class="value" span="4"></colgroup>
-
-  <thead>
-  <tr>
-
-
-
-
-
-
-    <th>Variable</th>
-
-
-
-
-
-
-    <th>Value</th>
-
-
-
-
-
-
-    <th>Value</th>
-
-
-
-
-
-
-    <th>Value</th>
-
-
-
-
-
-
-    <th>Value</th>
-
-
-
-
-
-
-  </tr>
-
-
-
-
-
-
-  </thead>
-
-  <tbody>
-
-
-
-
-
-
-    <tr>
-
-
-
-
-
-
-      <td>${LOG}</td>
-
-
-
-
-
-
-      <td># Set in My Setup</td>
-
-
-
-
-
-
-      <td></td>
-
-
-
-
-
-
-      <td></td>
-
-
-
-
-
-
-      <td></td>
-
-
-
-
-
-
-    </tr>
-
-
-
-
-
-
-
-    <tr>
-
-
-
-
-
-
-      <td>${REPORT}</td>
-
-
-
-
-
-
-      <td># -- ;; --</td>
-
-
-
-
-
-
-      <td></td>
-
-
-
-
-
-
-      <td></td>
-
-
-
-
-
-
-      <td></td>
-
-
-
-
-
-
-    </tr>
-
-
-
-
-
-
-
-    <tr>
-
-
-
-
-
-
-      <td>${SUMMARY}</td>
-
-
-
-
-      <td># -- ;; --</td>
-
-
-
-
-
-
-
-
-      <td></td>
-
-
-
-
-
-
-      <td></td>
-
-
-
-
-
-
-      <td></td>
-
-
-
-
-
-
-    </tr>
-
-
-
-
-    <tr>
-
-
-
-
-      <td align="undefined" valign="undefined"></td>
-
-
-
-
-      <td align="undefined" valign="undefined"></td>
-
-
-
-
-      <td align="undefined" valign="undefined"></td>
-
-
-
-
-      <td align="undefined" valign="undefined"></td>
-
-
-
-
-      <td align="undefined" valign="undefined"></td>
-
-
-
-
-    </tr>
-
-
-
-
-
-
-
-
-
-
-
-  </tbody>
-</table>
-
-
-
-
-
-
-
-
-
-
-
-<table border="1">
-
-
-
-
-
-
- <colgroup span="99"><col class="name"><col class="action"><col class="arg" span="3"></colgroup>
-
-  <thead>
-  <tr>
-
-
-
-
-
-
-    <th>Test Case</th>
-
-
-
-
-
-
-    <th>Action</th>
-
-
-
-
-
-
-    <th>Argument</th>
-
-
-
-
-
-
-    <th>Argument</th>
-
-
-
-
-
-
-
-
-  </tr>
-
-
-
-
-
-
-  </thead>
-
-  <tbody>
-
-
-
-
-
-
-    <tr>
-
-
-
-
-
-
-      <td>Suite Documentation</td>
-
-
-
-
-
-
-      <td>Equals</td>
-
-
-
-
-
-
-      <td>${SUITE.status}</td>
-
-
-
-
-
-
-      <td>PASS</td>
-
-
-
-
-
-
-
-
-    </tr>
-
-
-
-
-
-
-
-
-
-
-    <tr>
-
-
-
-
-
-
-      <td></td>
-
-
-
-
-
-
-      <td>${doc} =</td>
-
-
-
-
-
-
-      <td>Set</td>
-
-
-
-
-
-
-      <td>
-
-
-
-
-
- <pre id="line344">Test cases demonstrating html formatting of suite and test docs and suite metadata.&lt;br /&gt;\n<br>&lt;br /&gt;\n<br>It is possible to format text with &lt;b&gt;bold&lt;/b&gt;, &lt;i&gt;italic&lt;/i&gt; and &lt;i&gt;&lt;b&gt;bold italic&lt;/b&gt;&lt;/i&gt;.<br>Also links like &lt;a href="http://basso.fi/radio"&gt;http://basso.fi/radio&lt;/a&gt;,<br>&lt;a href="ftp://funet.fi"&gt;ftp://funet.fi&lt;/a&gt; and &lt;a href="file:///c:/temp"&gt;file:///c:/temp&lt;/a&gt;<br>are automatically formatted.&lt;br /&gt;\n<br>Image links like<br>&lt;img src="http://server/image.jpg"; title="http://server/image.jpg"; style="border: 1px solid gray" /&gt;<br>even create images.&lt;br /&gt;\n<br>Furthermore tables and horizontal rulers are available as seen by examples below.&lt;br /&gt;\n<br>&lt;br /&gt;\n<br>&lt;hr /&gt;\n<br>&lt;br /&gt;\n<br>&lt;table border="1" class="doc"&gt;\n<br>&lt;tr&gt;\n<br>&lt;td&gt;&lt;b&gt;a&lt;/b&gt;&lt;/td&gt;\n<br>&lt;td&gt;&lt;b&gt;b&lt;/b&gt;&lt;/td&gt;\n<br>&lt;td&gt;&lt;b&gt;c&lt;/b&gt;&lt;/td&gt;\n<br>&lt;/tr&gt;\n<br>&lt;tr&gt;\n<br>&lt;td&gt;&lt;i&gt;1&lt;/i&gt;&lt;/td&gt;\n<br>&lt;td&gt;xx&lt;/td&gt;\n<br>&lt;td&gt;yy&lt;/td&gt;\n<br>&lt;/tr&gt;\n<br>&lt;tr&gt;\n<br>&lt;td&gt;&lt;i&gt;2&lt;/i&gt;&lt;/td&gt;\n<br>&lt;td&gt;zz&lt;/td&gt;\n<br>&lt;td&gt;&lt;/td&gt;\n<br>&lt;/tr&gt;\n<br>&lt;/table&gt;\n<br>&lt;br /&gt;\n<br>&lt;hr /&gt;\nThere was a bug handling " in the end of suite doc: "</pre>
-
-
-
-
-
-
-      </td>
-
-
-
-
-
-
-
-
-    </tr>
-
-
-
-
-
-
-
-    <tr>
-
-
-
-
-      <td align="undefined" valign="undefined"></td>
-
-
-
-
-      <td align="undefined" valign="undefined">Message</td>
-
-
-
-
-      <td align="undefined" valign="undefined">1)</td>
-
-
-
-
-      <td align="undefined" valign="undefined">Suite doc in log</td>
-
-
-
-
-    </tr>
-
-
-
-
-    <tr>
-
-
-
-
-
-
-      <td></td>
-
-
-
-
-
-
-      <td>Contains</td>
-
-
-
-
-
-
-      <td>${LOG}</td>
-
-
-
-
-
-
-      <td>
-
-
-
-
-
- <pre id="line383">&lt;<span class="start-tag">tr</span>&gt;&lt;<span class="start-tag">th</span>&gt;Full <span class="entity"></span>Name:&lt;/<span class="end-tag">th</span>&gt;&lt;<span class="start-tag">td</span>&gt;Html Formatting&lt;/<span class="end-tag">td</span>&gt;&lt;/<span class="end-tag">tr</span>&gt;\n<br>&lt;<span class="start-tag">tr</span>&gt;&lt;<span class="start-tag">th</span>&gt;Documentation:&lt;/<span class="end-tag">th</span>&gt;&lt;<span class="start-tag">td</span>&gt;${doc}&lt;/<span class="end-tag">td</span>&gt;&lt;/<span class="end-tag">tr</span>&gt;<br></pre>
-
-
-
-
-
-
-      </td>
-
-
-
-
-
-
-
-
-    </tr>
-
-
-
-
-
-
-
-    <tr>
-
-
-
-
-      <td align="undefined" valign="undefined"></td>
-
-
-
-
-      <td align="undefined" valign="undefined">Message</td>
-
-
-
-
-      <td align="undefined" valign="undefined">2)</td>
-
-
-
-
-      <td align="undefined" valign="undefined">Suite doc in report</td>
-
-
-
-
-    </tr>
-
-
-
-
-    <tr>
-
-
-
-
-      <td align="undefined" valign="undefined"></td>
-
-
-
-
-      <td>Contains</td>
-
-
-
-
-      <td>${REPORT}</td>
-
-
-
-
-      <td>
-
-
-
-
-
- <pre id="line344"><span class="attribute-value">Html Formatting</span>&lt;/<span class="end-tag">a</span>&gt;&lt;/<span class="end-tag">td</span>&gt;\n<br>&lt;<span class="start-tag">td</span> <span class="attribute-name">class</span>=<span class="attribute-value">"col_doc"</span>&gt;${doc}&lt;/<span class="end-tag">td</span>&gt;<br></pre>
-
-
-
-
-
-
-      </td>
-
-
-
-
-    </tr>
-
-
-
-
-    <tr>
-
-
-
-
-      <td align="undefined" valign="undefined"></td>
-
-
-
-
-      <td align="undefined" valign="undefined">Message</td>
-
-
-
-
-      <td align="undefined" valign="undefined">3)</td>
-
-
-
-
-      <td align="undefined" valign="undefined">Summary info in report</td>
-
-
-
-
-    </tr>
-
-
-
-
-    <tr>
-
-
-
-
-      <td align="undefined" valign="undefined"></td>
***The diff for this file has been truncated for email.***

Reply via email to