Sandbox: Difference between revisions

From Alpine Linux
m (This is the last of my ideas for testing...)
m (Remove name parameter altogether and only use the 1st positional parameter just like the classic template.)
Line 1: Line 1:
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>
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 positional parameter 1 is unset or empty.<br>


The following 3 should produce the exact same URL:<br>
The following 2 should produce the exact same URL:<br>
Old way with positional parameter 1 only: {{Template:Sandbox|apk-tools}}<br>
Old template parameter 1 only: {{Template:Sandbox|apk-tools}}<br>
New way with name parameter only: {{Template:Sandbox|name=apk-tools}}<br>
New template parameter 1 only: {{Template:Sandbox|apk-tools}}<br>
Nonsensical combination of old and new: {{Template:Sandbox|apk|name=apk-tools}}<br>
<br>
<br>
The following should produce the exact same URLs:<br>
The following should produce the exact same URLs:<br>
Positional parameter 1 + repo parameter: {{Template:Sandbox|apk-tools|repo=main}}<br>
Positional parameter 1 + repo parameter: {{Template:Sandbox|apk-tools|repo=main}}<br>
name parameter + repo parameter: {{Template:Sandbox|name=apk-tools|repo=main}}<br>
Many parameters set: {{Template:Sandbox|apk-tools|repo=main|branch=edge|arch=x86_64}}<br><br>
Many parameters set: {{Template:Sandbox|name=apk-tools|repo=main|branch=edge|arch=x86_64}}<br><br>


Nonsense handling:<br>
Nonsense handling:<br>
Line 17: Line 15:
Empty positional argument passed:<br>
Empty positional argument passed:<br>
Old template: {{pkg|}} New template: {{Template:Sandbox|}}<br><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>
Line 33: Line 28:


Link to all pipewire packages from maintainer "team/alpine-desktop"<br>
Link to all pipewire packages from maintainer "team/alpine-desktop"<br>
{{Template:Sandbox|name=pipewire*|arch=|maintainer=team/alpine-desktop}}<br><br>
{{Template:Sandbox|pipewire*|arch=|maintainer=team/alpine-desktop}}<br><br>


Link to all linux-edge packages from maintainer "Milan P. Stanić"<br>
Link to all linux-edge packages from maintainer "Milan P. Stanić"<br>
{{Template:Sandbox|linux-edge|arch=|maintainer=Milan P. Stanić}}
{{Template:Sandbox|linux-edge|arch=|maintainer=Milan P. Stanić}}<br><br>
 
Link to all i686 ALSA packages on 3.19 (this is the hardest test on the page because mediawiki is very prone to breaking template parameters that start with a star!):<br>
{{Template:Sandbox|*alsa*|branch=v3.19|arch=x86}}

Revision as of 00:30, 29 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 positional parameter 1 is unset or empty.

The following 2 should produce the exact same URL:
Old template parameter 1 only: 3.20.3



New template parameter 1 only: 3.20.3




The following should produce the exact same URLs:
Positional parameter 1 + repo parameter: 3.20.3



Many parameters set: 3.20.3




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: 3.20.3




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




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



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





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




Link to all pipewire packages from maintainer "team/alpine-desktop"
3.20.3




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




Link to all i686 ALSA packages on 3.19 (this is the hardest test on the page because mediawiki is very prone to breaking template parameters that start with a star!):
3.20.3