local concat = table.concat
local format = string.format
local insert = table.insert
local nowiki = require("Module:string utilities").nowiki
local tostring = tostring
local frame = mw.getCurrentFrame()
local function preprocess(text)
return frame:preprocess(text)
end
local function dump_object(object)
if type(object) ~= "table" then
return object
end
return tostring(object)
end
local Token = {}
Token.__index = Token
Token.__tostring = function(t)
return t
end
function Token:new(type)
return setmetatable({
type
}, Token)
end
local tests = require("Module:UnitTests")
local parser = require("Module:User:Theknightwho/wikitext parser")
function tests:compare(test, expected)
tests:equals(
{nowiki(test), test},
dump_object(parser.parse(test)),
expected,
{nowiki = true}
)
end
function tests:compare_preprocess(test, expected)
local preprocessed = preprocess(test)
tests:equals(
{nowiki(test), preprocessed},
dump_object(parser.parse(preprocessed)),
expected,
{nowiki = true}
)
end
--[==[
function tests:test_headings()
local tests = {
{"\n=foo=", {"\n", HeadingStart:new{1}, "foo", HeadingEnd}},
}
self:iterate(tests, "compare")
end
]==]
function tests:test_magic_links()
local tests = {
"ISBN",
{"ISBN 1413304540", "]"},
{"ISBN 0", "ISBN 0"},
{"ISBN 0123456789", "]"},
{"ISBN 1413304540-", "]-"},
{"ISBN 1413304540&", "]&"},
{"ISBN 1413304540…", "]…"},
{"ISBN 14133045405", "ISBN 14133045405"},
{"ISBN 1413304540q", "ISBN 1413304540q"},
{"ISBN 1413304540é", "ISBN 1413304540é"},
{"ISBN 1413304540𠀀", "ISBN 1413304540𠀀"},
{"ISBN 141330454X", "]"},
{"ISBN 141330454x", "]"},
{"ISBN 141330454-0", "]"},
{"ISBN 14-1330-454-0", "]"},
{"ISBN 141330454-X", "]"},
{"ISBN 141330454-x", "]"},
{"ISBN 1-4-1-3-3-0-4-5-4-0", "]"},
{"ISBN 1-4-1-3-3-0-4-5-4-X", "]"},
{"ISBN 141330454", "ISBN 141330454"},
{"ISBN 14133045X", "ISBN 14133045X"},
{"ISBN 14133045x", "ISBN 14133045x"},
{"ISBN 14133045400", "ISBN 14133045400"},
{"ISBN 141330454x0", "ISBN 141330454x0"},
{"ISBN 1413304540X", "ISBN 1413304540X"},
{"ISBN -1413304540", "ISBN -1413304540"},
{"ISBN 1413304540-0", "]-0"},
{"ISBN 141330454x-0", "]-0"},
{"ISBN 1413304540-X", "]-X"},
{"ISBN 141330454-00", "ISBN 141330454-00"},
{"ISBN 141330454-x0", "ISBN 141330454-x0"},
{"ISBN 141330454-0X", "ISBN 141330454-0X"},
{"ISBN 141330454-0-0", "]-0"},
{"ISBN 141330454-x-0", "]-0"},
{"ISBN 141330454-0-X", "]-X"},
{"ISBN 1-4-1-3-3-0-4-5-4-0-0", "]-0"},
{"ISBN 1-4-1-3-3-0-4-5-4-x-0", "]-0"},
{"ISBN 1-4-1-3-3-0-4-5-4-0-X", "]-X"},
{"ISBN 141x304540", "ISBN 141x304540"},
{"ISBN 141X30454X", "ISBN 141X30454X"},
{"ISBN 141x304540X", "ISBN 141x304540X"},
{"ISBN 141X30454-0", "ISBN 141X30454-0"},
{"ISBN 141X30454-x", "ISBN 141X30454-x"},
{"ISBN 141x304540-X", "ISBN 141x304540-X"},
{"ISBN 141x30454-0X", "ISBN 141x30454-0X"},
{"ISBN 141x30454-0-X", "ISBN 141x30454-0-X"},
{"ISBN 14-1X30-454-0", "ISBN 14-1X30-454-0"},
{"ISBN 14-1X30-454-x", "ISBN 14-1X30-454-x"},
{"ISBN 14-1x30-4540-X", "ISBN 14-1x30-4540-X"},
{"ISBN 14-1x30-454-0X", "ISBN 14-1x30-454-0X"},
{"ISBN 14-1x30-454-0-X", "ISBN 14-1x30-454-0-X"},
{"ISBN 1-4-1-X-3-0-4-5-4-0", "ISBN 1-4-1-X-3-0-4-5-4-0"},
{"ISBN 1-4-1-X-3-0-4-5-4-x", "ISBN 1-4-1-X-3-0-4-5-4-x"},
{"ISBN 1-4-1-X-3-0-4-5-4-0-X", "ISBN 1-4-1-X-3-0-4-5-4-0-X"},
{"ISBN 14133045405", "]5"},
{"ISBN 1413304540q", "]q"},
{"ISBN 1413304540é", "]é"},
{"ISBN 1413304540𠀀", "]𠀀"},
{"ISBN \194\160 1413304540", "]"},
{"ISBN\225\154\128\226\129\159\226\128\131 1413304540", "]"},
{"ISBN 1413304540", "]"},
{"ISBN 1413304540", "]"},
{"ISBN 1413304540", "]"},
{"ISBN 1413304540", "]"},
{"ISBN 1413304540", "]"},
{"ISBN   1413304540", "]"},
{"ISBN 1413304540", "ISBN 1413304540"},
{"ISBN 1413304540", "ISBN 1413304540"},
{"ISBN 1413304540", "ISBN 1413304540"},
{"ISBN 1413304540", "ISBN 1413304540"},
{"ISBN 1413304540 0", "] 0"},
{"ISBN 141330454x 0", "] 0"},
{"ISBN 1413304540 X", "] X"},
{"ISBN 141-3304540 0", "] 0"},
{"ISBN 1-4133 0454x 0", "] 0"},
{"ISBN 1 4133 0454x 0", "] 0"},
{"ISBN-1413304540", "ISBN-1413304540"},
{"ISBN-1413304540", "ISBN-1413304540"},
{"ISBN 1413304540", "ISBN 1413304540"},
{"ISBN 14133-0454x", "ISBN 14133-0454x"},
{"ISBN 14133 -04540", "ISBN 14133 -04540"},
{"ISBN 14133- 04540", "ISBN 14133- 04540"},
{"ISBN 14133- 04540", "ISBN 14133- 04540"},
{"ISBN 14 13304540", "ISBN 14 13304540"},
{"ISBN 14133\226\128\130 04540", "ISBN 14133\226\128\130 04540"},
{"ISBN 14--133 04540", "ISBN 14--133 04540"},
{"ISBN 14 13304540", "ISBN 14 13304540"},
{"ISBN 1413304 540", "ISBN 1413304\226\128\135540"},
{"ISBN 9780306406157", "]"},
{"ISBN 9780306406157-", "]-"},
{"ISBN 9780306406157&", "]&"},
{"ISBN 9780306406157…", "]…"},
{"ISBN 97803064061575", "ISBN 97803064061575"},
{"ISBN 9780306406157q", "ISBN 9780306406157q"},
{"ISBN 9780306406157é", "ISBN 9780306406157é"},
{"ISBN 9780306406157𠀀", "ISBN 9780306406157𠀀"},
{"ISBN 97803064061575", "]5"},
{"ISBN 9780306406157q", "]q"},
{"ISBN 9780306406157é", "]é"},
{"ISBN 9780306406157𠀀", "]𠀀"},
{"ISBN 9790306406157", "]"},
{"ISBN 978030640615X", "]"},
{"ISBN 978030640615x", "]"},
{"ISBN 978-0-306-40615-7", "]"},
{"ISBN 978-0-306-40615-X", "]"},
{"ISBN 978-0-306-40615-x", "]"},
{"ISBN 9-7-8-0-3-0-6-4-0-6-1-5-7", "]-1-5-7"},
{"ISBN 9-7-8-0-3-0-6-4-0-6-1-5-X", "]-1-5-X"},
{"ISBN 9780306406 157", "]"},
{"ISBN 9780306406 157", "]"},
{"ISBN 9770306406157", "ISBN 9770306406157"},
{"ISBN 9680306406157", "ISBN 9680306406157"},
{"ISBN 8780306406157", "ISBN 8780306406157"},
{"ISBN 9-780306406157", "ISBN 9-780306406157"},
{"ISBN 97-80306406157", "ISBN 97-80306406157"},
{"ISBN 978-0306406157", "]"},
{"ISBN 97803064061", "ISBN 97803064061"},
{"ISBN 9780306406X", "ISBN 9780306406X"},
{"ISBN 9780306406x", "ISBN 9780306406x"},
{"ISBN 97803064061570", "ISBN 97803064061570"},
{"ISBN 9780306406157X", "ISBN 9780306406157X"},
{"ISBN 9780306406157x", "ISBN 9780306406157x"},
{"ISBN 97803064061x0", "ISBN 97803064061x0"},
{"ISBN -9780306406157", "ISBN -9780306406157"},
{"ISBN 9780306406157-0", "]-0"},
{"ISBN 978030640615x-0", "]-0"},
{"ISBN 9780306406157-X", "]-X"},
{"ISBN 978030640615-00", "ISBN 978030640615-00"},
{"ISBN 978030640615-x0", "ISBN 978030640615-x0"},
{"ISBN 978030640615-0X", "ISBN 978030640615-0X"},
{"ISBN 978030640615-7-0", "]-0"},
{"ISBN 978030640615-x-0", "]-0"},
{"ISBN 978030640615-7-X", "]-X"},
{"ISBN 978-0-3-0-6-4-0-6-1-5-7-0", "]-0"},
{"ISBN 978-0-3-0-6-4-0-6-1-5-x-0", "]-0"},
{"ISBN 978-0-3-0-6-4-0-6-1-5-7-X", "]-X"},
{"ISBN 978-0-3-0-6-4-0-6-1-5", "]-1-5"},
{"ISBN 978-0-3-0-6-4-0-6-1-x", "]-1-x"},
{"ISBN 978-0-3-0-6-4-0-6-1", "]-1"},
{"ISBN 978-0-3-0-6-4-0-6-X", "]-X"},
{"ISBN 978-0-3-0-6-4-0-6", "]"},
{"ISBN 978-0-3-0-6-4-0-X", "]"},
{"ISBN 9-7-8-0-3-0-6-4-0-6-1-5-7-0", "]-1-5-7-0"},
{"ISBN 9-7-8-0-3-0-6-4-0-6-1-5-x-0", "]-1-5-x-0"},
{"ISBN 9-7-8-0-3-0-6-4-0-6-1-5-7-X", "]-1-5-7-X"},
"PMID",
{"PMID 11209037", ""},
{"PMID 0", ""},
{"PMID 0123456789", ""},
{"PMID 11209037-", "-"},
{"PMID 11209037&", "&"},
{"PMID 11209037…", "…"},
{"PMID 112090375", ""},
{"PMID 11209037q", "PMID 11209037q"},
{"PMID 11209037é", "PMID 11209037é"},
{"PMID 11209037𠀀", "PMID 11209037𠀀"},
{"PMID 112090375", "5"},
{"PMID 11209037q", "q"},
{"PMID 11209037é", "é"},
{"PMID 11209037𠀀", "𠀀"},
{"PMID \194\160 11209037", ""},
{"PMID\225\154\128\226\129\159\226\128\131 11209037", ""},
{"PMID 11209037", ""},
{"PMID 11209037", ""},
{"PMID 11209037", ""},
{"PMID 11209037", ""},
{"PMID 11209037", ""},
{"PMID   11209037", ""},
{"PMID 11209037", "PMID 11209037"},
{"PMID 11209037", "PMID 11209037"},
{"PMID 11209037", "PMID 11209037"},
{"PMID 11209037", "PMID 11209037"},
"RFC",
{"RFC 5620", ""},
{"RFC 0", ""},
{"RFC 0123456789", ""},
{"RFC 5620-", "-"},
{"RFC 5620&", "&"},
{"RFC 5620…", "…"},
{"RFC 56205", ""},
{"RFC 5620q", "RFC 5620q"},
{"RFC 5620é", "RFC 5620é"},
{"RFC 5620𠀀", "RFC 5620𠀀"},
{"RFC 56205", "5"},
{"RFC 5620q", "q"},
{"RFC 5620é", "é"},
{"RFC 5620𠀀", "𠀀"},
{"RFC \194\160 5620", ""},
{"RFC\225\154\128\226\129\159\226\128\131 5620", ""},
{"RFC 5620", ""},
{"RFC 5620", ""},
{"RFC 5620", ""},
{"RFC 5620", ""},
{"RFC 5620", ""},
{"RFC   5620", ""},
{"RFC 5620", "RFC 5620"},
{"RFC 5620", "RFC 5620"},
{"RFC 5620", "RFC 5620"},
{"RFC 5620", "RFC 5620"},
}
self:iterate(tests, "compare")
end
function tests:test_strip_markers()
local tests = {
{"<nowiki>foo</nowiki>", "foo"},
{"<nowiki>]</nowiki>", "[[foo]]"},
{"<nowiki></nowiki>", "[https://en.wiktionary.org/]"},
{"<nowiki>https://en.wiktionary.org/</nowiki>", "https://en.wiktionary.org/"},
{"<nowiki>&</nowiki>", "&"},
{"<nowiki>∾̳</nowiki>", "∾̳"},
}
self:iterate(tests, "compare_preprocess")
end
function tests:test_wikilinks()
local tests = {
{"]", "]"},
{"]", "]"},
{"]", "]"},
{"]", "]"},
{"]", "]"},
{"]", "]"},
{"]", "]"},
{"]", "]"},
{"]", "]"},
{"]", "]"},
{"]", "]"},
{"]", "[[f%25%36%66o]]"},
{"]", "[[f%6fo]]"},
{"]", "[[[foo]]"},
{"]]", "]]"},
{"]]", "[[[foo]]]"},
{"]", "[[]"},
{"]]]", "]]]"},
{"]]", "[[]]"},
{"]]]", "[[[foo]]]]"},
{"]]]", "[[]]]"},
{"]", "[[[[[foo]]"},
{"]]]]", "]]]]"},
{"]]", "[[[[[foo]]]"},
{"]]]]", "[[[foo]]]]]"},
{"]]]", "[[[[[foo]]]]"},
{"]]]]", "[[]]]]"},
{"]]]]", "[[[[[foo]]]]]"},
{"]", "[[[[]"},
{"]]]]]", "]]]]]"},
{"]]", "[[[[]]"},
{"]]]]]", "[[[foo]]]]]]"},
{"]]]", "[[[[]]]"},
{"]]]]]", "[[]]]]]"},
{"]]]]", "[[[[]]]]"},
{"]]]]]", "[[[[[foo]]]]]]"},
{"]]]]]", "[[[[]]]]]"},
{"]", "]"},
{"]", "[[[foo|bar]]"},
{"]]", "]]"},
{"]]", "[[[foo|bar]]]"},
{"]", "[[]"},
{"]]]", "]]]"},
{"]]", "[[]]"},
{"]]]", "[[[foo|bar]]]]"},
{"]]]", "[[]]]"},
{"]", "[[[[[foo|bar]]"},
{"]]]]", "]]]]"},
{"]]", "[[[[[foo|bar]]]"},
{"]]]]", "[[[foo|bar]]]]]"},
{"]]]", "[[[[[foo|bar]]]]"},
{"]]]]", "[[]]]]"},
{"]]]]", "[[[[[foo|bar]]]]]"},
{"]", "[[[[]"},
{"]]]]]", "]]]]]"},
{"]]", "[[[[]]"},
{"]]]]]", "[[[foo|bar]]]]]]"},
{"]]]", "[[[[]]]"},
{"]]]]]", "[[]]]]]"},
{"]]]]", "[[[[]]]]"},
{"]]]]]", "[[[[[foo|bar]]]]]]"},
{"]]]]]", "[[[[]]]]]"},
{"]", "]"},
{"]", "[[[foo|[bar]]"},
{"]]", "]"},
{"]]", "[[[foo|[bar]]]"},
{"]", "[[]"},
{"]]]", "]]"},
{"]]", "[[]"},
{"]]]", "[[[foo|[bar]]]]"},
{"]]]", "[[]]"},
{"]", "[[[[[foo|[bar]]"},
{"]]]]", "]]]"},
{"]]", "[[[[[foo|[bar]]]"},
{"]]]]", "[[[foo|[bar]]]]]"},
{"]]]", "[[[[[foo|[bar]]]]"},
{"]]]]", "[[]]]"},
{"]]]]", "[[[[[foo|[bar]]]]]"},
{"]", "[[[[]"},
{"]]]]]", "]]]]"},
{"]]]]]]", "]]]]]"},
{"]]", "[[[[]"},
{"]]]]]", "[[[foo|[bar]]]]]]"},
{"]]]]]]", "[[[foo|[bar]]]]]]]"},
{"]]]", "[[[[]]"},
{"]]]]]", "[[]]]]"},
{"]]]]]]", "[[]]]]]"},
{"]]]]", "[[[[]]]"},
{"]]]]]", "[[[[[foo|[bar]]]]]]"},
{"]]]]]]", "[[[[[foo|[bar]]]]]]]"},
{"]]]]]", "[[[[]]]]"},
{"]]]]]]", "[[[[]]]]]"},
{"]", "]"},
{"]", "]"},
{"]]", "]"},
{"]]", "]"},
{"]", "[[foo|][][[][][]]"},
{"]", "[[foo|[][][[][][]]"},
{"]]", "[[foo|][][[][][]]]"},
{"]]", "[[foo|[][][[][][]]]"},
{"]", "[[foo]"},
{"]bar]]", "]]]"},
{"]","]"},
{"]", "[[foo\1bar]]"},
{"]", "[[foo\2bar]]"},
{"]", "[[foo\3bar]]"},
{"]", "[[foo\4bar]]"},
{"]", "[[foo\5bar]]"},
{"]", "[[foo\6bar]]"},
{"]", "[[foo\abar]]"},
{"]", "[[foo\bbar]]"},
{"]", "[[foo\tbar]]"},
{"]", "[[foo\nbar]]"},
{"]", "[[foo\vbar]]"},
{"]", "[[foo\fbar]]"},
{"]", "[[foo\nbar]]"},
{"]", "[[foo\14bar]]"},
{"]", "[[foo\15bar]]"},
{"]", "[[foo\16bar]]"},
{"]", "[[foo\17bar]]"},
{"]", "[[foo\18bar]]"},
{"]", "[[foo\19bar]]"},
{"]", "[[foo\20bar]]"},
{"]", "[[foo\21bar]]"},
{"]", "[[foo\22bar]]"},
{"]", "[[foo\23bar]]"},
{"]", "[[foo\24bar]]"},
{"]", "[[foo\25bar]]"},
{"]", "[[foo\26bar]]"},
{"]", "[[foo\27bar]]"},
{"]", "[[foo\28bar]]"},
{"]", "[[foo\29bar]]"},
{"]", "[[foo\30bar]]"},
{"]", "[[foo\31bar]]"},
{"]", "]"},
{"]", "[[foo<bar]]"},
{"]", "]"},
{"]", "[[foo>bar]]"},
{"]", "[[foo[bar]]"},
{"bar]]", "[[foo]bar]]"},
{"]", "[[foo{bar]]"},
{"]", "[[foo}bar]]"},
{"]", "]"},
{"]", "[[foo\127bar]]"},
{"]", "[[foo%00bar]]"},
{"]", "[[foo%01bar]]"},
{"]", "[[foo%02bar]]"},
{"]", "[[foo%03bar]]"},
{"]", "[[foo%04bar]]"},
{"]", "[[foo%05bar]]"},
{"]", "[[foo%06bar]]"},
{"]", "[[foo%07bar]]"},
{"]", "[[foo%08bar]]"},
{"]", "[[foo%09bar]]"},
{"]", "[[foo%0Abar]]"},
{"]", "[[foo%0abar]]"},
{"]", "[[foo%0Bbar]]"},
{"]", "[[foo%0bbar]]"},
{"]", "[[foo%0Cbar]]"},
{"]", "[[foo%0cbar]]"},
{"]", "[[foo%0Dbar]]"},
{"]", "[[foo%0dbar]]"},
{"]", "[[foo%0Ebar]]"},
{"]", "[[foo%0ebar]]"},
{"]", "[[foo%0Fbar]]"},
{"]", "[[foo%0fbar]]"},
{"]", "[[foo%10bar]]"},
{"]", "[[foo%11bar]]"},
{"]", "[[foo%12bar]]"},
{"]", "[[foo%13bar]]"},
{"]", "[[foo%14bar]]"},
{"]", "[[foo%15bar]]"},
{"]", "[[foo%16bar]]"},
{"]", "[[foo%17bar]]"},
{"]", "[[foo%18bar]]"},
{"]", "[[foo%19bar]]"},
{"]", "[[foo%1Abar]]"},
{"]", "[[foo%1abar]]"},
{"]", "[[foo%1Bbar]]"},
{"]", "[[foo%1bbar]]"},
{"]", "[[foo%1Cbar]]"},
{"]", "[[foo%1cbar]]"},
{"]", "[[foo%1Dbar]]"},
{"]", "[[foo%1dbar]]"},
{"]", "[[foo%1Ebar]]"},
{"]", "[[foo%1ebar]]"},
{"]", "[[foo%1Fbar]]"},
{"]", "[[foo%1fbar]]"},
{"]", "]"},
{"]", "[[foo%3Cbar]]"},
{"]", "[[foo%3cbar]]"},
{"]", "]"},
{"]", "]"},
{"]", "[[foo%3Ebar]]"},
{"]", "[[foo%3ebar]]"},
{"]", "[[foo%5Bbar]]"},
{"]", "[[foo%5bbar]]"},
{"]", "[[foo%5Dbar]]"},
{"]", "[[foo%5dbar]]"},
{"]", "[[foo%7Bbar]]"},
{"]", "[[foo%7bbar]]"},
{"]", "[[foo%7Cbar]]"},
{"]", "[[foo%7cbar]]"},
{"]", "[[foo%7Dbar]]"},
{"]", "[[foo%7dbar]]"},
{"]", "]"},
{"]", "]"},
{"]", "[[foo%7Fbar]]"},
{"]", "[[foo%7fbar]]"},
{"]", "[[foo&#0;bar]]"},
{"]", "[[foo&#1;bar]]"},
{"]", "[[foo&#2;bar]]"},
{"]", "[[foo&#3;bar]]"},
{"]", "[[foo&#4;bar]]"},
{"]", "[[foo&#5;bar]]"},
{"]", "[[foo&#6;bar]]"},
{"]", "[[foo&#7;bar]]"},
{"]", "[[foo&#8;bar]]"},
{"]", "[[foo\tbar]]"},
{"]", "[[foo\nbar]]"},
{"]", "[[foo&#11;bar]]"},
{"]", "[[foo&#12;bar]]"},
{"]", "[[foo&#13;bar]]"},
{"]", "[[foo&#14;bar]]"},
{"]", "[[foo&#15;bar]]"},
{"]", "[[foo&#16;bar]]"},
{"]", "[[foo&#17;bar]]"},
{"]", "[[foo&#18;bar]]"},
{"]", "[[foo&#19;bar]]"},
{"]", "[[foo&#20;bar]]"},
{"]", "[[foo&#21;bar]]"},
{"]", "[[foo&#22;bar]]"},
{"]", "[[foo&#23;bar]]"},
{"]", "[[foo&#24;bar]]"},
{"]", "[[foo&#25;bar]]"},
{"]", "[[foo&#26;bar]]"},
{"]", "[[foo&#27;bar]]"},
{"]", "[[foo&#28;bar]]"},
{"]", "[[foo&#29;bar]]"},
{"]", "[[foo&#30;bar]]"},
{"]", "[[foo&#31;bar]]"},
{"]", "]"},
{"]", "[[foo<bar]]"},
{"]", "]"},
{"]", "[[foo>bar]]"},
{"]", "[[foo[bar]]"},
{"]", "[[foo]bar]]"},
{"]", "[[foo{bar]]"},
{"]", "[[foo|bar]]"},
{"]", "[[foo}bar]]"},
{"]", "]"},
{"]", "[[foo&#127;bar]]"},
{"]", "[[foo&#x0;bar]]"},
{"]", "[[foo&#X0;bar]]"},
{"]", "[[foo&#x1;bar]]"},
{"]", "[[foo&#X1;bar]]"},
{"]", "[[foo&#x2;bar]]"},
{"]", "[[foo&#X2;bar]]"},
{"]", "[[foo&#x3;bar]]"},
{"]", "[[foo&#X3;bar]]"},
{"]", "[[foo&#x4;bar]]"},
{"]", "[[foo&#X4;bar]]"},
{"]", "[[foo&#x5;bar]]"},
{"]", "[[foo&#X5;bar]]"},
{"]", "[[foo&#x6;bar]]"},
{"]", "[[foo&#X6;bar]]"},
{"]", "[[foo&#x7;bar]]"},
{"]", "[[foo&#X7;bar]]"},
{"]", "[[foo&#x8;bar]]"},
{"]", "[[foo&#X8;bar]]"},
{"]", "[[foo\tbar]]"},
{"]", "[[foo\tbar]]"},
{"]", "[[foo\nbar]]"},
{"]", "[[foo\nbar]]"},
{"]", "[[foo\nbar]]"},
{"]", "[[foo\nbar]]"},
{"]", "[[foo&#xB;bar]]"},
{"]", "[[foo&#XB;bar]]"},
{"]", "[[foo&#xb;bar]]"},
{"]", "[[foo&#Xb;bar]]"},
{"]", "[[foo&#xC;bar]]"},
{"]", "[[foo&#XC;bar]]"},
{"]", "[[foo&#xc;bar]]"},
{"]", "[[foo&#Xc;bar]]"},
{"]", "[[foo&#xD;bar]]"},
{"]", "[[foo&#XD;bar]]"},
{"]", "[[foo&#xd;bar]]"},
{"]", "[[foo&#Xd;bar]]"},
{"]", "[[foo&#xE;bar]]"},
{"]", "[[foo&#XE;bar]]"},
{"]", "[[foo&#xe;bar]]"},
{"]", "[[foo&#Xe;bar]]"},
{"]", "[[foo&#xF;bar]]"},
{"]", "[[foo&#XF;bar]]"},
{"]", "[[foo&#xf;bar]]"},
{"]", "[[foo&#Xf;bar]]"},
{"]", "[[foo&#x10;bar]]"},
{"]", "[[foo&#X10;bar]]"},
{"]", "[[foo&#x11;bar]]"},
{"]", "[[foo&#X11;bar]]"},
{"]", "[[foo&#x12;bar]]"},
{"]", "[[foo&#X12;bar]]"},
{"]", "[[foo&#x13;bar]]"},
{"]", "[[foo&#X13;bar]]"},
{"]", "[[foo&#x14;bar]]"},
{"]", "[[foo&#X14;bar]]"},
{"]", "[[foo&#x15;bar]]"},
{"]", "[[foo&#X15;bar]]"},
{"]", "[[foo&#x16;bar]]"},
{"]", "[[foo&#X16;bar]]"},
{"]", "[[foo&#x17;bar]]"},
{"]", "[[foo&#X17;bar]]"},
{"]", "[[foo&#x18;bar]]"},
{"]", "[[foo&#X18;bar]]"},
{"]", "[[foo&#x19;bar]]"},
{"]", "[[foo&#X19;bar]]"},
{"]", "[[foo&#x1A;bar]]"},
{"]", "[[foo&#X1A;bar]]"},
{"]", "[[foo&#x1a;bar]]"},
{"]", "[[foo&#X1a;bar]]"},
{"]", "[[foo&#x1B;bar]]"},
{"]", "[[foo&#X1B;bar]]"},
{"]", "[[foo&#x1b;bar]]"},
{"]", "[[foo&#X1b;bar]]"},
{"]", "[[foo&#x1C;bar]]"},
{"]", "[[foo&#X1C;bar]]"},
{"]", "[[foo&#x1c;bar]]"},
{"]", "[[foo&#X1c;bar]]"},
{"]", "[[foo&#x1D;bar]]"},
{"]", "[[foo&#X1D;bar]]"},
{"]", "[[foo&#x1d;bar]]"},
{"]", "[[foo&#X1d;bar]]"},
{"]", "[[foo&#x1E;bar]]"},
{"]", "[[foo&#X1E;bar]]"},
{"]", "[[foo&#x1e;bar]]"},
{"]", "[[foo&#X1e;bar]]"},
{"]", "[[foo&#x1F;bar]]"},
{"]", "[[foo&#X1F;bar]]"},
{"]", "[[foo&#x1f;bar]]"},
{"]", "[[foo&#X1f;bar]]"},
{"]", "]"},
{"]", "]"},
{"]", "[[foo<bar]]"},
{"]", "[[foo<bar]]"},
{"]", "[[foo<bar]]"},
{"]", "[[foo<bar]]"},
{"]", "]"},
{"]", "]"},
{"]", "]"},
{"]", "]"},
{"]", "[[foo>bar]]"},
{"]", "[[foo>bar]]"},
{"]", "[[foo>bar]]"},
{"]", "[[foo>bar]]"},
{"]", "[[foo[bar]]"},
{"]", "[[foo[bar]]"},
{"]", "[[foo[bar]]"},
{"]", "[[foo[bar]]"},
{"]", "[[foo]bar]]"},
{"]", "[[foo]bar]]"},
{"]", "[[foo]bar]]"},
{"]", "[[foo]bar]]"},
{"]", "[[foo{bar]]"},
{"]", "[[foo{bar]]"},
{"]", "[[foo{bar]]"},
{"]", "[[foo{bar]]"},
{"]", "[[foo|bar]]"},
{"]", "[[foo|bar]]"},
{"]", "[[foo|bar]]"},
{"]", "[[foo|bar]]"},
{"]", "[[foo}bar]]"},
{"]", "[[foo}bar]]"},
{"]", "[[foo}bar]]"},
{"]", "[[foo}bar]]"},
{"]", "]"},
{"]", "]"},
{"]", "]"},
{"]", "]"},
{"]", "[[foo&#x7F;bar]]"},
{"]", "[[foo&#X7F;bar]]"},
{"]", "[[foo&#x7f;bar]]"},
{"]", "[[foo&#X7f;bar]]"},
{"]", "[[foo\tbar]]"},
{"]", "[[foo\nbar]]"},
{"]", "[[foo<bar]]"},
{"]", "]"},
{"]", "[[foo<bar]]"},
{"]", "[[foo>bar]]"},
{"]", "[[foo>bar]]"},
{"]", "[[foo[bar]]"},
{"]", "[[foo[bar]]"},
{"]", "[[foo]bar]]"},
{"]", "[[foo]bar]]"},
{"]", "[[foo{bar]]"},
{"]", "[[foo{bar]]"},
{"]", "[[foo|bar]]"},
{"]", "[[foo|bar]]"},
{"]", "[[foo|bar]]"},
{"]", "[[foo}bar]]"},
{"]", "[[foo}bar]]"},
{"]", "]"},
}
self:iterate(tests, "compare")
end
return tests