Feature Test Spec   
TEXT -> HTML Conversion
5.0 Project (Sea-Monkey)
Mail and News Component
mn-html-to-text.txt

Written by:  Alan S. Jones (asj@ipa.net)
Last updated:  February 29, 2000

Because this feature is testing conversion and includes test cases, this test spec is 
written in text and not html.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Text to HTML Conversions
http://bugzilla.mozilla.org/show_bug.cgi?id=16507
Bug was assigned to and fixed by: Ben Bucksch <mozilla.news@bucksch.org>

Ben setup some sample information at:
http://www.bucksch.org/1/projects/mozilla/16507/index.html

To search for important issues or problems search for **

This page can be found at:
http://www.mozilla.org/quality/mailnews/tests/mn-html-to-txt.txt

Other mail News Tes can be found at:
http://www.mozilla.org/quality/mailnews/tests/index.html

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Known Issues:
In build 2000022708 there is a bug in where certain conversions like :) or
(c) do not take place if the e-mail is sent from Mozilla in the format of
"Plain Text and HTML" or just HTML only.  The conversions do work correctly
if the message is sent only in "Plain Text" from Mozilla or from Eudora.

http://bugzilla.mozilla.org/show_bug.cgi?id=19313
<BenB> Alan: can you also test for entities, i.e. &trade; etc.?
<BenB> this is about *entering" &trade;, when (tm) was there
<BenB> I'm talking about an already inserted &trade; inside an URL staying
sane etc.
<BenB> in this case, of course, the URL shouldn't be linked,  compare 19313
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

The following information can can be e-mailed to test different functions.

Many items will NOT be converted if a space is inserted like * bold*.

*bold* -> <srong>bold<srong>
/italic/  -> <em class=txt_slash>italic</em>     ** DON'T THINK IT IS
WORKING **
_underline_  <em class=txt_underline> emphasis</em>  ** NOT WORKING **
|code|  -> <code class=txt_verticalline>code</code>  ** NOT WORKING **

(c) -> &copy (copyright sign)
(r) -> &reg  (registered trade mark sign)
+/- -> &plusmn (plus or minus sign)

Other Characters to consider:
http://www.htmlhelp.com/reference/html40/entities/symbols.html
http://www.htmlhelp.com/reference/html40/entities/latin1.html
http://www.htmlhelp.com/reference/html40/entities/special.html

^2  -> <sup>2</sup>            ** I thought this was supposed to work!!! **
2^2 -> 2<sup>2</sup>
a^25 -> a<sup>25</sup>
2^b  -> not converted as b is not a digit.
a^b  -> not converted as b is not a digit.

:-)  -> smile.gif
:)   -> smile.gif
:-(  -> frown.gif
:(   -> frown.gif
;-)  -> wink.gif
;-P  -> sick.gif

;)   -> wink.gif (will not work)

Note for users: For best results, put a space between smilies and closing
brackets. Otherwise, the code can't distinguish a smily plus a closing
bracket from a smily with a large smile, and no substitution is done.
Don't omit the closing bracket after a smily (e.g. that way :-), or your
parenthesis will look unbalanced (after all, they are).

URL Tests
www.mozilla.org
http://www.mozilla.org
<http://www.mozilla.org>
"http://www.mozilla.org"

<a href="http://www.mozilla.org.com">"Mozilla site"</a>
<a href="http://www.mozilla.org.com">Mozilla site</a>
<URL:http://www.mozilla.org>

<news://news.mozilla.org/1234@any.msg.id.com>

<URL:http://www.mozilla.org  will work becae of the http://

In the cases with angle brakes and double quotes as delimiters, the
delimiters should be included in the link, e.g. <a
href="http://a.com">"http://a.com"</a>, but not in all other cases.

MAIL TESTS

asj@ipa.net
mailto:asj@ipa.net
<asj@bigfoot.com>

The following strings are not substituted:
|TXT   |HTML     |Reason
+------+---------+----------
 ->     &larr;    Bug #454
 =>     &lArr;    dito
 <-     &rarr;    dito
 <=     &rArr;    dito
 (tm)   &trade;   dito
 1/4    &frac14;  is triggered by 1/4 Part 1, 2/4 Part 2, ...
 3/4    &frac34;  dito
 1/2    &frac12;  similar

SPECIAL TEST CASES

5 * 3 * 4 = 60 -> should do nothing (spaces and not alpha)
5*5*6=150      -> should do nothing (no alpha character)
5*A*6*1=Z      -> should do nothing (no leading/ending spaces)
5 * A * 6 * 1 = Z  -> should do nothing

Multi character test with spaces in the middle *This is a test*
Multi character test with spaces in the middle /This is a test/
Multi character test with spaces in the middle _This is a test_

Multi line test that won't work *This is
a test*

In all cases, please tale special care about special cases, like line
start, line end and special characters, and unusual real life cases (like
the multiplication above or
"bla (mozilla@bucksch.org, " or source code).

=-=-=-=-=-=-=-=-=-=-=-=-=
This is an e-mail test of text conversions.

The four items like *bold*  /italic/ _underline_  |code| should all be
easily converted.  Adding a comma between the four items should be
converted *bold*, /italic/, _underline_, and |code|.

=-=-=-=-=-=-=-=-=-=-=-=-=

Mozilla is smart!!  ASCII ART Is not damaged.

+---------------------------------------------------------------------+
|[] Mozilla preferences ::::::::::::::::::::::::::::::::::::::::::::: |
+---------------------------------------------------------------------+
|/Standard settings\/Mail accounts\/News servers\/Browser zones\_____ |
||                  `""""""""""""""""""""""""""""""""""""""""""""""""||
|| Standard settings apply unless overridden by settings for a       ||
|| particular mail account, news server, or browser zone.            ||
||                                                                   ||
||  Category             Display - Colors :::::::::::::::::::::::::: ||
|| +-------------------+                                             ||
|| |= General =========| When a page does not specify colors, use:   ||
|| |= Display =========| (:[SILLY SMILEY FACE] for backgrounds       ||
|| |   Languages       | (##) for text                               ||
|| |   Fonts           | [UNINTELLIGENTLY LINKED @ SYMBOL]) for links||
|| | > Colors <        | (OO) for previously-visited links           ||
|| |   Style sheets    | (**) for highlighted links                  ||
|| |   Cookies         |                                             ||
|| |   JavaScript      | ( ) Always use these colors, ignoring those ||
|| |   Java            |     specified in the document               ||
|| |= Navigator =======| (*) Use colors specified in the document    ||
|| |= Messenger =======|  *test*                                     ||
|| |= Composer ========|                                             ||
|| +-------------------+ ::::::::::::::::::::::::::::::::::::::::::: ||
|`-------------------------------------------------------------------'|
|( Help )                                        ( Cancel ) (( Save ))|
+---------------------------------------------------------------------+