Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP add parser tests for features added in 2.0 #52

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions tests/parser/parserTests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,47 @@ wgExternalContentFileExtensionWhitelist=["md"]
!! html
<div class="mw-message-box-error mw-message-box">Embedding files with this extension is not allowed</div>
!! end

!! test
Markdown is rendered as code block when wgExternalContentRenderMarkdownByDefault is false
!! config
wgExternalContentRenderMarkdownByDefault=false
!! wikitext
{{#embed:raw.githubusercontent.com/ProfessionalWiki/ExternalContent/master/README.md}}
!! html

!! end

!! test
Markdown is rendered as code block when render parameter is present
!! config
wgExternalContentRenderMarkdownByDefault=false
!! wikitext
{{#embed:raw.githubusercontent.com/ProfessionalWiki/ExternalContent/master/README.md|render}}
!! html

!! end

!! test
JSON is rendered as code block
!! wikitext
{{#embed:raw.githubusercontent.com/ProfessionalWiki/ExternalContent/master/extension.json}}
!! html

!! end

!! test
Lines numbers are shown when lineNumbers parameter is present
!! wikitext
{{#embed:raw.githubusercontent.com/ProfessionalWiki/ExternalContent/master/extension.json|lineNumbers}}
!! html

!! end

!! test
Only lines specified by showLines are shown
!! wikitext
{{#embed:raw.githubusercontent.com/ProfessionalWiki/ExternalContent/master/extension.json|showLines=1-3,7,9-12}}
!! html

!! end
Loading