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.<br />\n<br><br />\n<br>It is
possible to format text with <b>bold</b>,
<i>italic</i> and <i><b>bold
italic</b></i>.<br>Also links like <a
href="http://basso.fi/radio">http://basso.fi/radio</a>,<br><a
href="ftp://funet.fi">ftp://funet.fi</a> and <a
href="file:///c:/temp">file:///c:/temp</a><br>are automatically
formatted.<br />\n<br>Image links like<br><img
src="http://server/image.jpg" title="http://server/image.jpg"
style="border: 1px solid gray" /><br>even create images.<br
/>\n<br>Furthermore tables and horizontal rulers are available as seen
by examples below.<br />\n<br><br />\n<br><hr
/>\n<br><br />\n<br><table border="1"
class="doc">\n<br><tr>\n<br><td><b>a</b></td>\n<br><td><b>b</b></td>\n<br><td><b>c</b></td>\n<br></tr>\n<br><tr>\n<br><td><i>1</i></td>\n<br><td>xx</td>\n<br><td>yy</td>\n<br></tr>\n<br><tr>\n<br><td><i>2</i></td>\n<br><td>zz</td>\n<br><td></td>\n<br></tr>\n<br></table>\n<br><br
/>\n<br><hr />\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"><<span class="start-tag">tr</span>><<span
class="start-tag">th</span>>Full <span
class="entity"></span>Name:</<span
class="end-tag">th</span>><<span class="start-tag">td</span>>Html
Formatting</<span class="end-tag">td</span>></<span
class="end-tag">tr</span>>\n<br><<span
class="start-tag">tr</span>><<span
class="start-tag">th</span>>Documentation:</<span
class="end-tag">th</span>><<span
class="start-tag">td</span>>${doc}</<span
class="end-tag">td</span>></<span
class="end-tag">tr</span>><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></<span class="end-tag">a</span>></<span
class="end-tag">td</span>>\n<br><<span class="start-tag">td</span>
<span class="attribute-name">class</span>=<span
class="attribute-value">"col_doc"</span>>${doc}</<span
class="end-tag">td</span>><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.***