diff --git a/tests/parser/citeParserTests.txt b/tests/parser/citeParserTests.txt index d5dd509f9..a2a2d3422 100644 --- a/tests/parser/citeParserTests.txt +++ b/tests/parser/citeParserTests.txt @@ -1744,3 +1744,388 @@ wgCiteBookReferencing=true !! end + +!! test +T236256 - Refining the same base multiple times is fine +!! config +wgCiteBookReferencing=true +!! wikitext +book +page 2 +page 3 + +!! html/php +

[1] +[2] +[3] +

+
    +
  1. book +
  2. +
  3. page 2 +
  4. +
  5. page 3 +
  6. +
+!! end + +!! test +T236256 - Naming refinements is fine +!! config +wgCiteBookReferencing=true +!! wikitext +book +page 2 +page 3 + + + +!! html/php +

[1] +[2] +[3] +[2] +[3] +

+
    +
  1. book +
  2. +
  3. 2.0 2.1 page 2 +
  4. +
  5. 3.0 3.1 page 3 +
  6. +
+!! end + +!! test +T236256 - Cant reuse a name for 2 refinements +!! config +wgCiteBookReferencing=true +!! wikitext +book +page 2 +page 3 + +!! html/php +

[1] +[2] +[2] +

+
    +
  1. book +
  2. +
  3. 2.0 2.1 page 2 Cite error: Invalid <ref> tag; name "b" defined multiple times with different content +
  4. +
+!! end + +!! test +T236256 - Cant refine a refined ref (no nesting) +!! config +wgCiteBookReferencing=true +!! wikitext +book +page 2 +section 3 + +!! html/php +

[1] +[2] +[3] +

+
    +
  1. book +
  2. +
  3. page 2 +
  4. +
  5. section 3 +
  6. +
+!! end + +!! test +T236256 - Refining a multi-part ref should be fine +!! config +wgCiteBookReferencing=true +!! wikitext +part 1 +part 2 +ok + +!! html/php +

[1] +

[2] +

+
    +
  1. part 1 part 2 +
  2. +
  3. ok +
  4. +
+!! end + +!! test +T236256 - Dont allow splitting a refinement for now +!! config +wgCiteBookReferencing=true +!! wikitext +book +page 2 +and page 3 the same time? + +!! html/php +

[1] +[2] +

+
    +
  1. book +
  2. +
  3. page 2 and page 3 the same time? +
  4. +
+!! end + +!! test +T236256 - Cant be a follow up and a refinement the same time +!! config +wgCiteBookReferencing=true +!! wikitext +book 1 +huh? + +!! html/php +

[1] +

+
    +
  1. book 1 huh? +
  2. +
+!! end + +!! test +T236256 - Cant be a follow up and a refinement the same time, even when referencing 2 different bases +!! config +wgCiteBookReferencing=true +!! wikitext +book 1 +book 2 +huh? + +!! html/php +

[1] +[2] +

+
    +
  1. book 1 huh? +
  2. +
  3. book 2 +
  4. +
+!! end + +!! test +T236256 - Everything in the same group +!! config +wgCiteBookReferencing=true +!! wikitext +book +page + + +!! html/php +

[g1 1] +[g1 2] +[g1 2] +

+
    +
  1. book +
  2. +
  3. 2.0 2.1 page +
  4. +
+!! end + +!! test +T236256 - Base and refinement in different groups +!! config +wgCiteBookReferencing=true +!! wikitext +book +page + + +!! html/php +

[g1 1] +[g2 1] +

+
    +
  1. book +
  2. +
+
    +
  1. page +
  2. +
+!! end + +!! test +T236256 - Refinement in the unnamed default group +!! config +wgCiteBookReferencing=true +!! wikitext +book +page + +!! html/php +

[g1 1] +[1] +

+
    +
  1. book +
  2. +
    +
  1. page +
  2. +
+!! end + +!! test +T236256 - Base in the unnamed default group +!! config +wgCiteBookReferencing=true +!! wikitext +book +page + +!! html/php +

[1] +[g1 1] +

+
    +
  1. page +
  2. +
    +
  1. book +
  2. +
+!! end + +!! test +T236256 - Refining a reference that doesn't exist #1 +!! config +wgCiteBookReferencing=true +!! wikitext +page 1 +!! html/php +[1]
    +
  1. page 1 +
  2. +
+!! end + +!! test +T236256 - Refining a reference that doesn't exist #2 +!! config +wgCiteBookReferencing=true +!! wikitext +book +page 1 +!! html/php +

[1] +

+[2]
    +
  1. book +
  2. +
  3. page 1 +
  4. +
+!! end + +!! test +T236256 - Named reference without text +!! config +wgCiteBookReferencing=true +!! wikitext + +page 1 +!! html/php +

[1] +

+[2]
    +
  1. Cite error: Invalid <ref> tag; +no text was provided for refs named a
  2. +
  3. page 1 +
  4. +
+!! end + +!! test +T236256 - Reference with the same name defined twice +!! config +wgCiteBookReferencing=true +!! wikitext +book +magazine +page 1 +!! html/php +

[1] +[1] +

+[2]
    +
  1. 1.0 1.1 book Cite error: Invalid <ref> tag; name "a" defined multiple times with different content +
  2. +
  3. page 1 +
  4. +
+!! end + +!! test +T236256 - No text for a refinement +!! config +wgCiteBookReferencing=true +!! wikitext +book + +!! html/php +

[1] +

+Cite error: The opening <ref> tag is malformed or has a bad name
    +
  1. book +
  2. +
+!! end + +!! test +T236256 - Empty text for a refinement +!! config +wgCiteBookReferencing=true +!! wikitext +book + +!! html/php +

[1] +Cite error: Invalid <ref> tag; +

+refs with no name must have content
    +
  1. book +
  2. +
+!! end + +!! test +T236256 - De-facto empty text for a refinement +!! config +wgCiteBookReferencing=true +!! wikitext +book + +!! html/php +

[1] +

+[2]
    +
  1. book +
  2. +
  3. +
  4. +
+!! end