Difference between revisions of "Template:Links to/testcases"

From blackwiki
Jump to navigation Jump to search
imported>Cpiral
(→‎top: + external style links for later testcases)
imported>Cpiral
Line 64: Line 64:
 
#THis "has" all the issues {{linksto|THis "has" all the issues|{{NAMESPACE}}:{{BASEPAGENAME}}}}
 
#THis "has" all the issues {{linksto|THis "has" all the issues|{{NAMESPACE}}:{{BASEPAGENAME}}}}
 
#THis has/all the issues {{linksto|THis has/all the issues|{{NAMESPACE}}:{{BASEPAGENAME}}}}
 
#THis has/all the issues {{linksto|THis has/all the issues|{{NAMESPACE}}:{{BASEPAGENAME}}}}
#THis_has_all_the_issues {{linksto/sandbox|THis has all the issues|{{NAMESPACE}}:{{BASEPAGENAME}}}}
+
#THis_has_all_the_issues {{linksto|THis has all the issues|{{NAMESPACE}}:{{BASEPAGENAME}}}}
#THis has all the_issues {{linksto/sandbox|THis has all the issues|{{NAMESPACE}}:{{BASEPAGENAME}}}}
+
#THis has all the_issues {{linksto|THis has all the issues|{{NAMESPACE}}:{{BASEPAGENAME}}}}
 
#THis has" all the issues {{linksto|THis has" all the issues|{{NAMESPACE}}:{{BASEPAGENAME}}}}
 
#THis has" all the issues {{linksto|THis has" all the issues|{{NAMESPACE}}:{{BASEPAGENAME}}}}
 
#THis has/all/ the issues {{linksto|THis has/all/ the issues|{{NAMESPACE}}:{{BASEPAGENAME}}}}
 
#THis has/all/ the issues {{linksto|THis has/all/ the issues|{{NAMESPACE}}:{{BASEPAGENAME}}}}

Revision as of 01:17, 8 December 2015

Each test says "On behalf of the parent page (namespace:basename, Template:Linksto), what links to section X"? There is no section X at Template:Linksto, but the query only ever looks for the pattern #X. It relies on the high probability that if a page is found to link "here" and it has also one of my section names, and preceded by a # sign, it probably does.

Required links, or patterns that simulate links, linksto on this page to work:

  1. Section link Template:Linksto Question [../|sublinks]]?
  2. Section link Template:Linksto Question "tick" marks?
  3. Section link Template:Linksto THis has/all/ the issues
  4. Section link Template:Linksto THis has" all the issues
  5. Section link Template:Linksto THis has all the_issues
  6. Section link Template:Linksto THis_has_all_the_issues
  7. Section link Template:Linksto THis has/all the issues
  8. Section link Template:Linksto THis "has" all the issues
  9. Section link Template:Linksto THis "has"/all the_issues
  • [//en.

These are external-style links to Template:Links to/doc#Purpose with and without fullurl and urlencode

Sandbox version

Via {{Section link}}: success means this page shows up in the search link.


Via [[fullpagename#section name]]:
Success means that the search link highlights the match corresponds to the simulated section link. The number signs (that make the ordered list) satisfy the regexp that simulates linksto mechanism.

  1. THis "has"/all the_issues Template:Links to#THis "has"/all the issues:  Template:Plain link · Template:Plain link
  1. THis "has" all the issues Template:Links to#THis "has" all the issues:  Template:Plain link · Template:Plain link
  1. THis has/all the issues Template:Links to#THis has/all the issues:  Template:Plain link · Template:Plain link
  1. THis_has_all_the_issues Template:Links to#THis has all the issues:  Template:Plain link · Template:Plain link
  1. THis has all the_issues Template:Links to#THis has all the issues:  Template:Plain link · Template:Plain link
  1. THis has" all the issues Template:Links to#THis has" all the issues:  Template:Plain link · Template:Plain link
  1. THis has/all/ the issues Template:Links to#THis has/all/ the issues:  Template:Plain link · Template:Plain link
  1. Question "tick" marks? Template:Links to#Question "tick" marks?:  Template:Plain link · Template:Plain link
  1. Question [../|sublinks]]? Template:Links to#Question [../|sublinks]]?:  Template:Plain link · Template:Plain link


Main template

Linksto template has two parts:

  1. linksto part links to a fullpagename, in this case Template:Links to.
  2. regex part links to the following patterns (# char required).

Via {{Section link}}: success means this page shows up in the search link


Via wikilink: The number signs (that make the ordered list) satisfy the regexp.

  1. THis "has"/all the_issues Template:Links to#THis "has"/all the issues:  Template:Plain link · Template:Plain link
  1. THis "has" all the issues Template:Links to#THis "has" all the issues:  Template:Plain link · Template:Plain link
  1. THis has/all the issues Template:Links to#THis has/all the issues:  Template:Plain link · Template:Plain link
  1. THis_has_all_the_issues Template:Links to#THis has all the issues:  Template:Plain link · Template:Plain link
  1. THis has all the_issues Template:Links to#THis has all the issues:  Template:Plain link · Template:Plain link
  1. THis has" all the issues Template:Links to#THis has" all the issues:  Template:Plain link · Template:Plain link
  1. THis has/all/ the issues Template:Links to#THis has/all/ the issues:  Template:Plain link · Template:Plain link
  1. Question "tick" marks? Template:Links to#Question "tick" marks?:  Template:Plain link · Template:Plain link
  1. Question [../|sublinks]]? Template:Links to#Question [../|sublinks]]?:  Template:Plain link · Template:Plain link


Together the above link to the basepagename plus the pattern, simulate the success mechanism. Success means activating the search link and seeing corresponding, highlighted, pattern match.