17564, 17871, 17883, 18249, 13753,

18012, 16800, maybe 17565 and 13278:
Integrate contributions from Ben Bucksch (mozilla@bucksch.org)
and Daniel Brattell (bratell@lysator.liu.se) to improve formatted
plaintext output, including adding text style indicators, improving
table output and wrapping, and fixing several wrapping/whitespace bugs.
Also update the auto tests to reflect some of the bugs recently fixed.
  r=myself,mozilla@bucksch.org,bratell@lysator.liu.se


git-svn-id: svn://10.0.0.236/trunk@53104 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
akkana%netscape.com
1999-11-10 23:50:45 +00:00
parent 5d1e46267a
commit 6f4b49e030
24 changed files with 584 additions and 270 deletions

View File

@@ -45,6 +45,7 @@ TEST_FILES = \
plainnowrap.out \
simple.html \
simplecopy.out \
simplefmt.out \
entityxif.xif \
entityxif.out \
mailquote.html \

View File

@@ -41,6 +41,13 @@ if ($status != 0) then
set errmsg = ($errmsg "simplecopy.out")
endif
echo "Testing simple html to plaintext formatting ..."
TestOutput -i text/html -o text/plain -f 34 -w 70 -c OutTestData/simplefmt.out OutTestData/simple.html
if ($status != 0) then
echo "Simple copy test failed.\n"
set errmsg = ($errmsg "simplefmt.out")
endif
echo "Testing non-wrapped plaintext ..."
TestOutput -i text/html -o text/plain -f 0 -w 0 -c OutTestData/plainnowrap.out OutTestData/plain.html
if ($status != 0) then
@@ -48,7 +55,7 @@ if ($status != 0) then
set errmsg = ($errmsg "plainnowrap.out")
endif
echo "Testing wrapped bug unformatted plaintext ..."
echo "Testing wrapped but unformatted plaintext ..."
TestOutput -i text/html -o text/plain -f 32 -w 50 -c OutTestData/plainwrap.out OutTestData/plain.html
if ($status != 0) then
echo "Wrapped plaintext test failed."
@@ -56,7 +63,7 @@ if ($status != 0) then
endif
echo "Testing mail quoting ..."
TestOutput -i text/html -o text/plain -c OutTestData/mailquote.out OutTestData/mailquote.html
TestOutput -i text/html -o text/plain -f 2 -w 50 -c OutTestData/mailquote.out OutTestData/mailquote.html
if ($status != 0) then
echo "Mail quoting test failed."
set errmsg = ($errmsg "mailquote.out")

View File

@@ -1,7 +1,5 @@
Below is a table.
Row 1 Col 1 Row 1 Col 2 Row 1 Col 3
Row 2 Col 1 Row 2 Col 2 Row 2 Col 3
Row 3 Col 1 Row 3 Col 2 Row 3 Col 3
Here is after table.

View File

@@ -37,7 +37,7 @@ I hope you will enjoy these quotes from <em>Hamlet</em>, introduced by a fairly
To be, or not to be, that is the question<br>
Whether 'tis nobler in the mind to suffer<br>
The slings and fortunes of outrageous fortune<br>
Or to take arms against a sea of troubles<br>
Or to take arms against a sea of troubles,
And by opposing end them.<br>
</blockquote>

View File

@@ -1,19 +1,22 @@
This page is a test of mail quoting.
I hope you will enjoy these quotes from Hamlet, introduced by a fairly long line to see how quotations get wrapped:
I hope you will enjoy these quotes from /Hamlet/,
introduced by a fairly long line to see how
quotations get wrapped:
>> (These have br tags after them.
>> /(These have *br* tags after them./
>> To be, or not to be, that is the question
>> Whether 'tis nobler in the mind to suffer
>> The slings and fortunes of outrageous fortune
>> Or to take arms against a sea of troubles
>> And by opposing end them.
>> Or to take arms against a sea of troubles, And
>> by opposing end them.
>
> Oh, what a mind is here o'erthrown.
>
>> (The next line does not end with a br tag.).
>> /(The next line does not end with a *br* tag.)./
>> Oh, what a rogue and peasant slave am I.
> (Neither does the next line:)
> /(Neither does the next line:)/
> The observed of all observers, quite, quite down!
Now we're outside all blockquotes.

View File

@@ -37,6 +37,7 @@ TEST_FILES = \
plainnowrap.out \
simple.html \
simplecopy.out \
simplefmt.out \
entityxif.xif \
entityxif.out \
mailquote.html \

View File

@@ -1,8 +1,13 @@
80 char width (for reference only):
---------|---------|---------|---------|---------|---------|---------|---------|
Here is a link to mozilla.org.
Here is some underlined and boldenedified text.
This is a test to make sure the output converters pick up the moz-pre-wrap style. They don't necessarily have to pick up the exact wrap setting.
- This should be tested with wrapping on.
- This should be tested with wrapping off.
This is the end.

View File

@@ -37,5 +37,22 @@ followed by a line break.
Plaintext output should contain only one space (and no line breaks) between "space" and "followed".
</p>
<p>
Here is a <em>list</em>:
</p>
<ul>
<li>An item</li>
<li>A nested ordered list:</li>
<li><ol>
<li>item one</li>
<li>item two</li>
</ol>
</li>
<li>last item</li>
</ul>
<p>Here is a paragraph after the list.</p>
</body>
</html>

View File

@@ -1,3 +1,13 @@
Simple html page Here is a link to mozilla.org. Here is some underlined and boldenedified text.
Simple html page
Here is a link to the mozilla.org page. Here is some underlined and boldenedified text plus some <angle bracket entities>.
Here is a line ending with a space followed by a line break. Plaintext output should contain only one space (and no line breaks) between "space" and "followed".
Here is a list:
An item
A nested ordered list:
item one
item two
last item
Here is a paragraph after the list.

View File

@@ -0,0 +1,23 @@
Simple html page
Here is a link to the mozilla.org <URL:"http://www.mozilla.org"> page.
Here is some _underlined and *bold*ened_ified text plus some <angle
bracket entities>.
Here is a line ending with a space followed by a line break. Plaintext
output should contain only one space (and no line breaks) between
"space" and "followed".
Here is a /list/:
* An item
* A nested ordered list:
*
1. item one
2. item two
* last item
Here is a paragraph after the list.