Sandbox: Difference between revisions

From Alpine Linux
m (More stress testing.)
m (More stress testing.)
Line 2: Line 2:


The following 3 should produce the exact same URL:<br>
The following 3 should produce the exact same URL:<br>
Old way with positional parameter 1 only: {{Template:Sandbox|apk}}<br>
Old way with positional parameter 1 only: {{Template:Sandbox|apk-tools}}<br>
New way with name parameter only: {{Template:Sandbox|name=apk}}<br>
New way with name parameter only: {{Template:Sandbox|name=apk-tools}}<br>
Nonsensical combination of old and new: {{Template:Sandbox|apk|name=apk}}<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|repo=main}}<br>
Positional parameter 1 + repo parameter: {{Template:Sandbox|apk-tools|repo=main}}<br>
name parameter + repo parameter: {{Template:Sandbox|name=apk|repo=main}}<br>
name parameter + repo parameter: {{Template:Sandbox|name=apk-tools|repo=main}}<br>
Many parameters set: {{Template:Sandbox|name=apk|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 16: Line 16:


Extra positional arguments passed (shouldn't make any difference)<br>
Extra positional arguments passed (shouldn't make any difference)<br>
Old template: {{pkg|apk|foo|bar|bat|baz}} New template: {{Template:Sandbox|apk|foo|bar|bat|baz}}
Old template: {{pkg|apk-tools|foo|bar|bat|baz}} New template: {{Template:Sandbox|apk-tools|foo|bar|bat|baz}}


Extra positional arguments and extra named arguments (shouldn't make any difference)<br>
Extra positional arguments and extra named arguments (shouldn't make any difference)<br>
Old template: {{pkg|apk|foo|repo=main|bacon=delicious}} New template: {{Template:Sandbox|apk|foo|repo=main|bacon=delicious}}
Old template: {{pkg|apk-tools|foo|repo=main|bacon=delicious}} New template: {{Template:Sandbox|apk-tools|foo|repo=main|bacon=delicious}}<br><br>
 
 
New behavior: Link to apk-tools for every arch, but only for maintainer "Natanael Copa":<br>
{{Template:Sandbox|apk-tools|arch=*|maintainer=Natanael Copa}}

Revision as of 20:23, 28 December 2023

This is a test of an upgraded version of the Template:pkg. It should preserve the old behavior,

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}}}

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