Sandbox: Difference between revisions

From Alpine Linux
m (More testing.)
m (This is the last of my ideas for testing...)
Line 1: Line 1:
This is a test of an upgraded version of the [[Template:pkg]]. It should preserve the old behavior, <br>
This is a test of an upgraded version of the [[Template:pkg]]. It should preserve all old behavior *EXCEPT* it will print an error if both positional parameter 1 and name are unset or empty.<br>


The following 3 should produce the exact same URL:<br>
The following 3 should produce the exact same URL:<br>
Line 13: Line 13:
Nonsense handling:<br>
Nonsense handling:<br>
No arguments passed whatsoever (new template should handle gracefully)<br>
No arguments passed whatsoever (new template should handle gracefully)<br>
Old template: {{pkg}} New template: {{Template:Sandbox}}
Old template: {{pkg}} New template: {{Template:Sandbox}}<br><br>
 
Empty positional argument passed:<br>
Old template: {{pkg|}} New template: {{Template:Sandbox|}}<br><br>
 
Empty name argument passed:<br>
New template: {{Template:Sandbox|name=}}<br><br>


Extra positional arguments passed (shouldn't make any difference)<br>
Extra positional arguments passed (shouldn't make any difference)<br>

Revision as of 21:31, 28 December 2023

This is a test of an upgraded version of the Template:pkg. It should preserve all old behavior *EXCEPT* it will print an error if both positional parameter 1 and name are unset or empty.

The following 3 should produce the exact same URL:
Old way with positional parameter 1 only: #apk-tools
New way with name parameter only: #{{{1}}}
Nonsensical combination of old and new: #apk

The following should produce the exact same URLs:
Positional parameter 1 + repo parameter: #apk-tools
name parameter + repo parameter: #{{{1}}}
Many parameters set: #{{{1}}}

Nonsense handling:
No arguments passed whatsoever (new template should handle gracefully)
Old template: First parameter cannot be undefined or empty in template: Template:Pkg New template: #{{{1}}}

Empty positional argument passed:
Old template: First parameter cannot be undefined or empty in template: Template:Pkg New template: #

Empty name argument passed:
New template: #{{{1}}}

Extra positional arguments passed (shouldn't make any difference)
Old template: apk-tools New template: #apk-tools. foo

Extra positional arguments and extra named arguments (shouldn't make any difference)
Old template: apk-tools New template: #apk-tools. foo


New behavior: Link to apk-tools for every arch, but only for maintainer "Natanael Copa":
#apk-tools

Link to all pipewire packages from maintainer "team/alpine-desktop"
#{{{1}}}

Link to all linux-edge packages from maintainer "Milan P. Stanić"
#linux-edge