| 1 |
583 |
dhwang |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| 2 |
|
|
<!-- |
| 3 |
|
|
Copyright 2004 ThoughtWorks, Inc |
| 4 |
|
|
|
| 5 |
|
|
Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 |
|
|
you may not use this file except in compliance with the License. |
| 7 |
|
|
You may obtain a copy of the License at |
| 8 |
|
|
|
| 9 |
|
|
http://www.apache.org/licenses/LICENSE-2.0 |
| 10 |
|
|
|
| 11 |
|
|
Unless required by applicable law or agreed to in writing, software |
| 12 |
|
|
distributed under the License is distributed on an "AS IS" BASIS, |
| 13 |
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 |
|
|
See the License for the specific language governing permissions and |
| 15 |
|
|
limitations under the License. |
| 16 |
|
|
--> |
| 17 |
|
|
<html> |
| 18 |
|
|
<head> |
| 19 |
|
|
<meta content="text/html; charset=ISO-8859-1" |
| 20 |
|
|
http-equiv="content-type"> |
| 21 |
|
|
<title>Test Verifications</title> |
| 22 |
|
|
</head> |
| 23 |
|
|
<body> |
| 24 |
|
|
<br> |
| 25 |
|
|
Test for markup and newlines in text content. |
| 26 |
|
|
<p>Our rule for whitespace is that all non-visible whitespace (including &nbsp;) should be replaced with a single space, but all visible newlines (<br>, <p>, and <pre>formatted newlines) should be preserved.</p> |
| 27 |
|
|
<table cellpadding="1" cellspacing="1" border="1"> |
| 28 |
|
|
<tbody> |
| 29 |
|
|
<tr> |
| 30 |
|
|
<td rowspan="1" colspan="3">Test Text Content<br> |
| 31 |
|
|
</td> |
| 32 |
|
|
</tr> |
| 33 |
|
|
|
| 34 |
|
|
<tr> |
| 35 |
|
|
<td>open</td> |
| 36 |
|
|
<td>../tests/html/test_text_content.html</td> |
| 37 |
|
|
<td> </td> |
| 38 |
|
|
</tr> |
| 39 |
|
|
<tr> |
| 40 |
|
|
<td>verifyText</td> |
| 41 |
|
|
<td>nonTextMarkup</td> |
| 42 |
|
|
<td> |
| 43 |
|
|
There is non-visible and visible markup here that doesn't change the text content |
| 44 |
|
|
</td> |
| 45 |
|
|
</tr> |
| 46 |
|
|
<!-- Match exactly the same space characters --> |
| 47 |
|
|
<tr> |
| 48 |
|
|
<td>verifyText</td> |
| 49 |
|
|
<td>spaces</td> |
| 50 |
|
|
<td>exact:1 space|2 space|3 space|1 nbsp|2 nbsp|3 nbsp|2 space_nbsp|2 nbsp_space|3 space_nbsp_space|3 nbsp_space_nbsp</td> |
| 51 |
|
|
</tr> |
| 52 |
|
|
<tr> |
| 53 |
|
|
<td>verifyText</td> |
| 54 |
|
|
<td>tabcharacter</td> |
| 55 |
|
|
<td>tab character between</td> |
| 56 |
|
|
</tr> |
| 57 |
|
|
<tr> |
| 58 |
|
|
<td>verifyText</td> |
| 59 |
|
|
<td>nonVisibleNewlines</td> |
| 60 |
|
|
<td>non visible newlines between</td> |
| 61 |
|
|
</tr> |
| 62 |
|
|
|
| 63 |
|
|
<tr> |
| 64 |
|
|
<td>verifyText</td> |
| 65 |
|
|
<td>visibleNewlines</td> |
| 66 |
|
|
<td>regexp:visible\s*newlines\s*between</td> |
| 67 |
|
|
</tr> |
| 68 |
|
|
<tr> |
| 69 |
|
|
<td>verifyNotText</td> |
| 70 |
|
|
<td>visibleNewlines</td> |
| 71 |
|
|
<td>visible newlines between</td> |
| 72 |
|
|
</tr> |
| 73 |
|
|
<tr> |
| 74 |
|
|
<td>verifyText</td> |
| 75 |
|
|
<td>paragraphs</td> |
| 76 |
|
|
<td>First paragraph*Second paragraph</td> |
| 77 |
|
|
</tr> |
| 78 |
|
|
<tr> |
| 79 |
|
|
<td>verifyNotText</td> |
| 80 |
|
|
<td>paragraphs</td> |
| 81 |
|
|
<td>First paragraph Second paragraph</td> |
| 82 |
|
|
</tr> |
| 83 |
|
|
<tr> |
| 84 |
|
|
<td>verifyText</td> |
| 85 |
|
|
<td>preformatted</td> |
| 86 |
|
|
<td>preformatted*newline</td> |
| 87 |
|
|
</tr> |
| 88 |
|
|
<tr> |
| 89 |
|
|
<td>verifyNotText</td> |
| 90 |
|
|
<td>preformatted</td> |
| 91 |
|
|
<td>preformatted newline</td> |
| 92 |
|
|
</tr> |
| 93 |
|
|
<tr> |
| 94 |
|
|
<td>verifyText</td> |
| 95 |
|
|
<td>mixedMarkup</td> |
| 96 |
|
|
<td>visible*newlines and markup and non-visible newlines and markup*With*a paragraph*and*pre*formatted*text</td> |
| 97 |
|
|
</tr> |
| 98 |
|
|
</tbody> |
| 99 |
|
|
</table> |
| 100 |
|
|
</body> |
| 101 |
|
|
</html> |