Page MenuHomePhabricator

nocat.parserTests.txt

Authored By
bzimport
Nov 21 2014, 7:01 PM
Size
1 KB
Referenced Files
None
Subscribers
None

nocat.parserTests.txt

####################################################################
# MY TESTS
# BEGIN HERE
!! article
Template:deadcats
!! text
This template has cats[[Category:Foo]]That will not appear
!! endarticle
!! article
Template:livecats
!! text
This template has cats[[Category:Bar]]That will appear
!! endarticle
# Creating the cats cleans up the output code
!! article
Category:Foo
!! text
Foo
!! endarticle
!! article
Category:Bar
!! text
Bar
!! endarticle
!! article
Category:Lorem
!! text
Lorem
!! endarticle
!! article
Category:Ipsum
!! text
Ipsum
!! endarticle
!! test
nocat1
!! options
cat
!! input
{{nocat:deadcats}}
!! result
!! end
!! test
nocat2
!! input
{{livecats}}
!! result
<p>This template has catsThat will appear
</p>
!! end
# Test both
!! test
nocat3
!! input
{{nocat:deadcats}}
{{livecats}}
!! result
<p>This template has catsThat will not appear
This template has catsThat will appear
</p>
!! end
# Now with the cat option
!! test
nocat4
!! options
cat
!! input
{{nocat:deadcats}}
{{livecats}}
!! result
<a href="/wiki/Category:Bar" title="Category:Bar">Bar</a>
!! end
# MY TESTS END HERE!!
####################################################################

File Metadata

Mime Type
text/html
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1238
Default Alt Text
nocat.parserTests.txt (1 KB)

Event Timeline