This portion of the Fit spe
Fit parses the tables from HTML do
fat.ParseFixture |
|
Html |
Parse() |
<table> <tr><td>1</td></tr> </table> |
[1] |
<table> <tr><td>1</td> <td>2</td></tr> <tr><td>3</td> <td>4</td></tr> </table> |
[1] [2] [3] [4] |
<table> <tr><td>1</td> <td>2</td></tr> <tr><td>3</td> <td>4</td></tr> </table> <table> <tr><td>5</td></tr> <tr><td>6</td></tr> </table> |
[1] [2] [3] [4] ---- [5] [6] |
Everything but table stru
fat.ParseFixture |
|
|
Html |
Parse() |
Output() |
<html> <body>Text before table... <table> <tr><td>1</td></tr> </table> Text after table...</body> </html> |
[1] |
<html> <body>Text before table... <table> <tr><td>1</td></tr> </table> Text after table...</body> </html> |
<table> Text in table <tr> Text in row <td>Text in more row </tr> more table</table> |
[Text in |
<table> Text in table <tr> Text in row <td>Text in more row </tr> more table</table> |
<table <tr attribute=”yes”><td align=”top”>Cell</td></tr> </table> |
[Cell] |
<table <tr attribute=”yes”><td align=”top”>Cell</td></tr> </table> |
Even whitespa
fat.ParseFixture |
|
|
Html |
Parse() |
Output() |
<html><body><table> <tr><td>1</td></tr> </table></body></html> |
[1] |
<html><body><table> <tr><td>1</td></tr> </table></body></html> |
<html> <body> <table> <tr> <td>1</td> </tr> </table> </body> </html> |
[1] |
<html> <body> <table> <tr> <td>1</td> </tr> </table> </body> </html> |
The
fat.ParseFixture |
|
Html |
Parse() |
<table> <tr><td>1</td></tr> <tr><td>2</td> <td>3</td> <td>4</td></tr> <tr><td>5</td> <td>6</td></tr> </table> |
[1] [2] [3] [4] [5] [6] |
<table> <tr><td rowspan=2>1</td> <td>2</td> <td>3</td></tr> <tr><td
</table> |
[1] [2] [3] [4] [5] |
Tables that are missing tags generate an error.
fat.ParseFixture |
|
|
Html |
Parse() |
Note |
<table> <tr><td>1</td> </table> |
error |
no ending <tr> tag |
<tr><td>1</td></tr> |
error |
no <table> tag |
<table> <td>1</td> </table> |
error |
no <tr> tag |
<table> <tr><td>1</tr> </table> |
error |
no ending </td> tag |
Tables
fat.ParseFixture |
|
Html |
Parse() |
<table> <tr><td>1</td></tr> <table> <tr><td>2</td></tr> </table> |
[1] [2] |
HTML mistakes that aren’t related to tables are ignored.
fat.ParseFixture |
|
Html |
Parse() |
<table> <tr><badTag...<td>1</td></tr> </table> |
[1] |
When Fit parses a table, it
Leading and trailing whitespa
fat.ParseFixture |
|
TableCell |
Parse() |
<td> a </td> |
[a] |
<td> a </td> |
[a] |
<td>a
</td> |
[a] |
<td> a </td> |
[a] |
<td>\u00a0 a \u00a0</td> |
[a] |
<td> <tag /> a</td> |
[a] |
Adjoining whitespa
fat.ParseFixture |
|
TableCell |
Parse() |
<td>1 + 2</td> |
[1 + 2] |
<td>1 <tag /> 2</td> |
[1 2] |
<td>1 2</td> |
[1 2] |
<td>1
\u00a0\u00a0\u00a02</td> |
[1 2] |
These spe
fat.ParseFixture |
|
Entity |
Parse() |
& |
[&] |
( ) |
[( )] |
< |
[<] |
> |
[>] |
" |
["] |
The non-breaking spa
fat.ParseFixture |
|
Entity |
Parse() |
(\u00a0) |
[( )] |
Extended
fat.ParseFixture |
|
Entity |
Parse() |
ñ |
[ñ] |
Line break tags are
fat.ParseFixture |
|
TableCell |
Parse() |
<td>intentional<br>line-break</td> |
[intentional\nline-break] |
<td>another
form<br />of line-break</td> |
[another form\nof line-break] |
<td>yet<br/>more<br
/>forms< br /
></td> |
[yet\nmore\nforms\n] |
Fit has a few spe
“Smart quotes” are
fat.ParseFixture |
|
TableCell |
Parse() |
<td>“double-quotes”
</td> |
["double-quotes"] |
<td>‘single
quotes’</td> |
['single quotes'] |
Word’s use of paragraph
tags for line breaks is supported.
fat.ParseFixture |
|
TableCell |
Parse() |
<td><p>Line
breaks</p> <p>in Word</p></td> |
[Line breaks\nin Word] |
<td><p>Alternative
line< / p
>< p
>breaks</td> |
[Alternative line\nbreaks] |
Other HTML markup is ignored.
fat.ParseFixture |
|
TableCell |
Parse() |
<td><b>text</b></td> |
[text] |
<td> a more <i> <spell |
[a more |
When the
Some
fat.OutputFixture |
|
Text |
CellOutput() |
< |
<td><</td> |
& |
<td>&</td> |
ASCII line feed
fat.OutputFixture |
|
Text |
CellOutput() |
Unix \n line feed |
<td>Unix <br /> line feed</td> |
Ma |
<td>Ma |
DOS \r\n line feed |
<td>DOS <br /> line feed</td> |
Ba |
<td>Ba |
Multiple adjoining spa
fat.OutputFixture |
|
Text |
CellOutput() |
1 2 |
<td>1 2</td> |
Known errors and omissions (fix me!):
fit.Summary |
|
counts | 54 right, 0 wrong, 0 ignored, 0 exceptions |
input file | C:\projects\fit\imp\java\..\..\spec\parse.html |
input update | Wed Jul 21 00:30:07 PDT 2004 |
output file | C:\projects\fit\imp\java\output\spec\parse.html |
run date | Tue Aug 31 16:56:41 PDT 2004 |
run elapsed time | 0:00.22 |