New BBCode Parser (NBBC) Conformance Tests

DescriptionResultAvg. Time
Input Validation Tests
Unknown tags like [foo] get ignored.Pass0.81 ms
Broken tags like [foo get ignored.Pass0.40 ms
Broken tags like [/foo get ignored.Pass0.39 ms
Broken tags like [] get ignored.Pass0.54 ms
Broken tags like [/ ] get ignored.Pass0.56 ms
Broken tags like [/ get ignored.Pass0.38 ms
Broken [ tags before [b]real tags[/b] don't break the real tags.Pass1.08 ms
Broken [tags before [b]real tags[/b] don't break the real tags.Pass1.18 ms
[i][b]Mis-ordered nesting[/i][/b] gets fixed.Pass1.28 ms
[url=][b]Mis-ordered nesting[/url][/b] gets fixed.Pass1.27 ms
[i]Unended blocks are automatically ended.Pass0.57 ms
Unstarted blocks[/i] have their end tags ignored.Pass0.57 ms
[b]Mismatched tags[/i] are not matched to each other.Pass0.91 ms
[center]Inlines and [b]blocks get[/b] nested correctly[/center].Pass1.34 ms
[b]Inlines and [center]blocks get[/center] nested correctly[/b].Pass1.37 ms
BBCode is [B]case-insensitive[/b].Pass1.67 ms
Plain text gets passed through unchanged.Pass0.37 ms
Special-Character Tests
& and < and > and " get replaced with HTML-safe equivalents.Pass0.27 ms
:-) produces a smiley <img> element.Pass0.33 ms
--- does *not* produce a [rule] tag.Pass0.29 ms
---- does *not* produce a [rule] tag.Pass0.31 ms
----- produces a [rule] tag.Pass0.58 ms
--------- produces a [rule] tag.Pass0.72 ms
[-] does *not* produce a comment.Pass0.65 ms
[--] produces a comment.Pass0.43 ms
[----] produces a comment.Pass0.42 ms
[--] comments may contain - and [ and " and ' characters.Pass0.50 ms
[--] comments may *not* contain newlines.Pass0.68 ms
['] produces a comment.Pass0.42 ms
['] comments may contain [ and " and ' characters.Pass0.43 ms
['] comments may *not* contain newlines.Pass0.67 ms
[!-- --] produces a comment.Pass0.43 ms
[!-- ] does *not* produce a viable comment.Pass0.54 ms
[!-- - -- ] [ --] produces a comment.Pass0.41 ms
[!-- - -- ] [ --] --] produces a comment with a --] left over.Pass0.58 ms
[!-- --] does not break any following tags outside it.Pass1.52 ms
Tag marker mode '<' works correctly.Pass1.26 ms
Tag marker mode '{' works correctly.Pass1.24 ms
Tag marker mode '(' works correctly.Pass1.54 ms
Ampersand pass-through mode works correctly.Pass1.39 ms
Whitespace Tests
Newlines get replaced with <br /> tags.Pass0.78 ms
Newlines *don't* get replaced with <br /> tags in ignore-newline mode.Pass0.72 ms
Space before and after newlines gets removed.Pass1.00 ms
Whitespace doesn't matter inside tags after the tag name.Pass1.11 ms
Whitespace does matter inside "quotes" in tags.Pass1.23 ms
Whitespace does matter inside 'quotes' in tags.Pass0.99 ms
Whitespace is properly collapsed near block tags like [center].Pass2.10 ms
[code]...[/code] should strip whitespace outside it but not inside it.Pass1.41 ms
[list] and [*] must consume correct quantities of whitespace.Pass3.42 ms
Inline Tag Conversion Tests
[i] gets correctly converted.Pass1.00 ms
[b] gets correctly converted.Pass1.17 ms
[u] gets correctly converted.Pass0.93 ms
[s] gets correctly converted.Pass1.30 ms
[sup] gets correctly converted.Pass1.56 ms
[sub] gets correctly converted.Pass0.96 ms
[font=Arial] gets correctly converted (simple font name).Pass1.04 ms
[font=Times New Roman] gets correctly converted (unquoted default value).Pass1.17 ms
[font=Times New Roman size=1] gets converted (trailing parameter identified).Pass1.29 ms
[font="Courier New"] gets correctly converted (quoted default value).Pass1.23 ms
[font="Courier New" blarg size=1] gets converted (floating parameter ignored).Pass1.26 ms
[size=6] gets correctly converted.Pass1.03 ms
[size=10] gets correctly converted.Pass1.00 ms
[size=blah] gets ignored.Pass0.96 ms
[color=red] gets correctly converted.Pass1.29 ms
[color=gronk] gets correctly converted.Pass1.18 ms
[color=#FFF] gets correctly converted.Pass1.07 ms
[color=*#$] is prohibited.Pass0.96 ms
[spoiler] gets converted.Pass1.01 ms
[acronym] gets converted.Pass1.67 ms
[acronym] safely encodes its content.Pass1.09 ms
URL Tests
[url=...] (with no protocol given) gets converted.Pass1.13 ms
[url=http:...] gets converted.Pass1.08 ms
[url=http:...] gets converted correctly in plain mode.Pass0.84 ms
Unquoted [url=http:...] with parameters gets converted.Pass1.09 ms
[url=https:...] gets converted.Pass1.10 ms
[url=ftp:...] gets converted.Pass0.97 ms
[url=mailto:...] gets converted.Pass1.05 ms
[url=javascript:...] is prohibited.Pass1.08 ms
[url=(unknown protocol):...] is prohibited.Pass1.09 ms
The [url]http://...[/url] form works correctly.Pass1.03 ms
The [url]http://...[/url] form works correctly in plain mode.Pass0.96 ms
The [url]malformed...url...[/url] form is fully unprocessed.Pass0.93 ms
[url="...=..."] contains an embedded equal sign (quotes work correctly).Pass0.98 ms
[url="...=..."] contains an embedded equal sign (test #2).Pass1.12 ms
[url="..." target="..."] has its target ignored by default.Pass1.33 ms
[url="..." target="..."] has its target used when URL targeting is enabled.Pass1.04 ms
[url] has a target applied when forced URL targeting is enabled.Pass1.02 ms
[url target="..."] has its target ignored when forced URL targeting is enabled.Pass1.10 ms
[url] has a target applied even with URL target overriding.Pass1.05 ms
[url target="..."] has its target applied with URL target overriding.Pass1.37 ms
[url=(includes a smiley)] is not converted into a smiley.Pass1.17 ms
Embedded URL Tests
Embedded URLs get detected and converted.Pass0.52 ms
Embedded HTTPS URLs get detected and converted.Pass0.45 ms
Embedded FTP URLs get detected and converted.Pass0.44 ms
Embedded Javascript URLs are properly ignored.Pass0.49 ms
Embedded domain names get detected and converted.Pass0.44 ms
Embedded IPs get detected and converted.Pass0.51 ms
Embedded addresses are smart about being inside parentheses.Pass0.46 ms
Embedded-URL detector disallows junk that only seems like a URL.Pass0.37 ms
Embedded-URL detector also detects e-mail addresses.Pass0.43 ms
Embedded-URL detector takes precedence over the smiley detector.Pass0.52 ms
Special URL-Like-Tag Tests
[email] gets converted.Pass0.94 ms
[email] supports both forms.Pass0.92 ms
Bad addresses in [email] are ignored.Pass0.97 ms
The [[wiki]] special tag produces a wiki link.Pass0.57 ms
The [[wiki]] special tag does not convert [a-zA-Z0-9'".:_-].Pass0.57 ms
The [[wiki]] special tag can contain spaces.Pass0.52 ms
The [[wiki]] special tag cannot contain newlines.Pass0.58 ms
The [[wiki]] special tag can contain a title after a | character.Pass0.57 ms
The [[wiki]] special tag doesn't damage anything outside it.Pass0.88 ms
The [[wiki]] special tag condenses and trims internal whitespace.Pass0.58 ms
Images and Replaced-Tag Conversion Tests
[img] produces an image.Pass1.06 ms
[img] disallows a javascript: URL.Pass0.97 ms
[img] disallows a URL with an unknown protocol type.Pass1.10 ms
[img] disallows HTML content.Pass0.93 ms
[img] can produce a local image.Pass1.67 ms
[img] can produce a local rooted URL.Pass1.13 ms
[img] can produce a local relative URL.Pass1.00 ms
[img] will skip nonexistent local images.Pass1.37 ms
[rule] produces a horizontal rule.Pass0.68 ms
[br] is equivalent to a newline.Pass0.84 ms
Block Tag Conversion Tests
[center]...[/center] should produce centered alignment.Pass1.59 ms
[left]...[/left] should produce left alignment.Pass1.57 ms
[right]...[/right] should produce right alignment.Pass1.60 ms
[indent]...[/indent] should produce indented content.Pass1.59 ms
[code]...[/code] should reproduce its contents exactly as they're given.Pass1.08 ms
[code]...[/code] should reproduce PHP source code undamaged.Pass1.05 ms
<code>...</code> should not misbehave in '<' tag marker mode.Pass0.99 ms
[quote]...[/quote] should produce a plain quote.Pass2.47 ms
Multiple nested [quote]...[/quote] tags should produce nested quotes.Pass2.27 ms
Multiple nested [quote]...[/quote] tags should produce nested quotes.Pass2.08 ms
[quote=John]...[/quote] should produce a quote from John.Pass2.42 ms
[quote="John Smith"]...[/quote] should produce a quote from John Smith.Pass2.68 ms
[quote name= date= url=]...[/quote] should produce a detailed quote.Pass1.23 ms
[quote name= date= url=]...[/quote] should disallow bad URLs.Pass1.22 ms
[quote="<script>javascript:alert()</script>"] should not produce Javascript.Pass2.52 ms
[columns] should produce columns.Pass2.71 ms
[nextcol] doesn't do anything outside a [columns] block.Pass0.73 ms
Bad column misuse doesn't break layouts.Pass2.11 ms
Lists and List Items
[list] and [*] should produce an unordered list.Pass1.73 ms
[list] and [*] should produce an unordered list even without [/list].Pass1.61 ms
[list=circle] should produce an unordered list.Pass1.77 ms
[list=disc] should produce an unordered list.Pass1.93 ms
[list=square] should produce an unordered list.Pass1.77 ms
[list=1] should produce an ordered list.Pass1.76 ms
[list=A] should produce an ordered list.Pass1.78 ms
[list=a] should produce an ordered list.Pass1.76 ms
[list=I] should produce an ordered list.Pass1.75 ms
[list=i] should produce an ordered list.Pass1.85 ms
[list=greek] should produce an ordered list.Pass1.75 ms
[list=georgian] should produce an ordered list.Pass1.75 ms
[list=armenian] should produce an ordered list.Pass1.75 ms
Test Results: 152 tests performed. 152 passed successfully, 0 failed.