public void CatsAndDefaultSort()
        {
            ArticleText = @"{{infobox person}}
'''John Smith''' (born 11 April 1990) is great.";

            GenFixes("John Smith");

            Assert.IsTrue(ArticleText.Contains(@"[[Category:1990 births]]"));
            Assert.IsTrue(ArticleText.Contains(@"[[Category:Living people]]"));
            Assert.IsTrue(ArticleText.Contains(@"{{DEFAULTSORT:Smith, John}}"));
        }
Ejemplo n.º 2
0
        public void MergeRefsErrors()
        {
            ArticleText = @"A.<ref name=”XXL Mag”>{{cite web|url=http://www.somesite.com/online/?p=70413 |title=a}}</ref><ref name=c>x</ref>

B.<ref name=c />
C.<ref name=”XXL Mag”>{{cite web|url=http://www.somesite.com/online/?p=70413 |title=a}}</ref>

==References==
{{reflist}}";
            GenFixes("Test");
            Assert.IsTrue(ArticleText.Contains(@"<ref name=""XXL Mag"">") && ArticleText.Contains(@"<ref name=""XXL Mag""/>"), "Fix the ref quote errors, then merge them");
        }
Ejemplo n.º 3
0
        public void MultipleIssues()
        {
            string before = @"{{Unreferenced|auto=yes|date=December 2009}}
{{Underlinked|date=November 2006}}
{{Notability|1=Music|date=September 2010}}
{{Advert|date=December 2007}}
'''Band''' is.

[[Category:Blues rock groups]]


{{Norway-band-stub}}", after = @"{{Multiple issues|
{{Unreferenced|date=December 2009}}
{{Underlinked|date=November 2006}}
{{Notability|1=Music|date=September 2010}}
{{Advert|date=December 2007}}
}}




'''Band''' is.

[[Category:Blues rock groups]]


{{Norway-band-stub}}";

            AssertChange(before, after);


            ArticleText = @"{{POV|date=May 2016}}
{{NPOV|date=May 2016}}
{{Orphan|date=May 2016}}
{{Dead end|date=May 2016}}

Minor bug";

            WikiRegexes.TemplateRedirects.Clear();
            WikiRegexes.TemplateRedirects = Parsers.LoadTemplateRedirects(@"{{tl|NPOV}} → {{tl|POV}}");
            GenFixes("A");

            Assert.IsTrue(ArticleText.Contains(@"{{Multiple issues|
{{POV|date=May 2016}}
{{Orphan|date=May 2016}}
{{Dead end|date=May 2016}}
}}"), "No excess pipes left when MI incorporates duplicate tags");
        }
        public void CatsAndDefaultSort2()
        {
            ArticleText = @"{{infobox person}}
'''Cecilia Uddén''' (born 11 April 1990) is great.";

            GenFixes("Cecilia Uddén");

            Assert.IsTrue(ArticleText.Contains(@"[[Category:1990 births]]"), "birth category");
            Assert.IsTrue(ArticleText.Contains(@"[[Category:Living people]]"), "living people");
            Assert.IsTrue(ArticleText.Contains(@"{{DEFAULTSORT:Udden, Cecilia}}"), "human name defaultsort without special characters");

            ArticleText = @"{{infobox person}}
'''İbrahim Smith''' (born 12 April 1991) is great.";

            GenFixes("İbrahim Smith");

            Assert.IsTrue(ArticleText.Contains(@"{{DEFAULTSORT:Ibrahim Smith}}"), "human name defaultsort (diacritics removed)");
        }
Ejemplo n.º 5
0
        public void LivingPeople()
        {
            ArticleText = @"{{Multiple issues|{{refimprove|date=July 2015}}{{BLP sources|date=July 2015}}}}

{{Infobox football biography
| name = Am
| birth_date  = 3 May 1983
}}

'''Amir'''  is.<ref>http://ca.soccerway.com/players/</ref>

==References==
<references/>

{{iran-footy-bio-stub}}

{{DEFAULTSORT:Amir}}
[[Category:A players]]";

            GenFixes();

            Assert.IsFalse(ArticleText.Contains(@"{Multiple issues"));
            Assert.IsTrue(ArticleText.Contains(@"Category:Living people"));
        }