# Force the test runner to ensure the extension is loaded !! hooks ref references !! endhooks !! test Simple , no !! input Wikipedia rocks!Proceeds of Rockology, vol. XXI !! result Wikipedia rocks![1]
  1. Proceeds of Rockology, vol. XXI
!! end !! test Simple , with !! input Wikipedia rocks!Proceeds of Rockology, vol. XXI !! result

Wikipedia rocks![1]

  1. Proceeds of Rockology, vol. XXI
!! end !! article Template:Simple template !! text A ''simple'' template. !! endarticle !! test with a simple template !! input Templating{{simple template}} !! result

Templating[1]

  1. A simple template.
!! end !! test with a !! input Templating{{simple template}} !! result

Templating[1]

  1. {{simple template}}
!! end !! test in a !! input Templating{{simple template}} !! result

Templating<ref>{{simple template}}</ref>


!! end !! test in a !! input Templating !! result

Templating


!! end !! test in a (bug 5384) !! input TemplatingText !! result

Templating[1]

  1. Text
!! end !! test after (bug 6164) !! input one Image:Foobar.jpg !! result

[1]

  1. one
!! end !! test {{REVISIONID}} on page with (bug 6299) !! input {{REVISIONID}}elite !! result 1337[1]
  1. elite
!! end !! test {{REVISIONID}} on page without (bug 6299 sanity check) !! input {{REVISIONID}} !! result

1337

!! end !! test Blank ref followed by ref with content !! input content !! result

[1]

[1]

  1. 1.0 1.1 content
!! end !! test Regression: non-blank ref "0" followed by ref with content !! input 0 content !! result

[1]

[1]

  1. 1.0 1.1 0
!! end !! test Regression sanity check: non-blank ref "1" followed by ref with content !! input 1 content !! result

[1]

[1]

  1. 1.0 1.1 1
!! end !! test Ref names containing a number !! input One Two Three !! result

[1] [2] [3]

  1. One
  2. Two
  3. Three
!! end !! test Erroneous refs !! input Zero Also zero, but differently! (Normal ref) !! result

Cite error: Invalid <ref> tag; name cannot be a simple integer. Use a descriptive title

[1]

Cite error: Invalid <ref> tag; refs with no content must have a name

[2]

[3]

Cite error: Invalid <references> tag; parameter "group" is allowed only. Use <references />, or <references group="..." />

  1. Also zero, but differently! (Normal ref)
  2. Cite error: Invalid <ref> tag; no text was provided for refs named bar
  3. Cite error: Invalid <ref> tag; no text was provided for refs named blankwithnoreference
!! end !! test Simple , with in group !! input Wikipedia rocks!Proceeds of Rockology, vol. XXI Wikipedia rocks!Proceeds of Rockology, vol. XXI !! result

Wikipedia rocks![1] Wikipedia rocks![note 1]

  1. Proceeds of Rockology, vol. XXI
  1. Proceeds of Rockology, vol. XXI
!! end !! test Simple , with in group, with groupname in chinese !! input AAAref aBBBnote bCCCref c ;refs ;notes !! result

AAA[参 1]BBB[注 1]CCC[参 2]

refs
  1. ref a
  2. ref c
notes
  1. note b
!! end !! test defined in !! input BAR !! result

[1]

  1. BAR
!! end !! test defined in called with #tag !! input {{#tag:references| BAR }} !! result

[1]

  1. BAR
!! end !! test defined in error conditions !! input BAR bad group BAR BAR !! result

[2 1]

  1. Cite error: Invalid <ref> tag; no text was provided for refs named foo

Cite error: <ref> tag with name "unused" defined in <references> is not used in prior text.
Cite error: <ref> tag in <references> has conflicting group attribute "1".
Cite error: <ref> tag defined in <references> has no name attribute.

!! end !! article MediaWiki:cite_link_label_group-klingon !! text wa' cha' wej loS vagh jav Soch chorgh Hut wa'maH !! endarticle !! test with custom group link !! input Wikipedia rocks!Proceeds of Rockology, vol. XXI !! result

Wikipedia rocks![wa']

  1. Proceeds of Rockology, vol. XXI
!! end !! test Bug 31374 regression check: nested strip items !! input {{#tag:ref|notereference|group=Note}} !! result

[Note 1]

  1. note[1]
  1. reference
!! end !! test Bug 13073 regression check: wrapped !! input foo
!! result

[1]

  1. foo
!! end