Sandbox: Difference between revisions

From Alpine Linux
m (The pkg template needs to be updated.)
Tag: Manual revert
m (added test case for potentially bad behavior in the pkg template.)
 
Line 22: Line 22:
Old template: {{pkg|apk-tools|foo|repo=main|bacon=delicious}} New template: {{Template:Sandbox|apk-tools|foo|repo=main|bacon=delicious}}<br><br>
Old template: {{pkg|apk-tools|foo|repo=main|bacon=delicious}} New template: {{Template:Sandbox|apk-tools|foo|repo=main|bacon=delicious}}<br><br>


empty branch parameter<br>
old template: {{pkg|apk-tools|branch=|arch=}}<br>
new template: {{Template:Sandbox|apk-tools|branch=|arch=}}<br><br>


New behavior:
New behavior:

Latest revision as of 18:12, 28 May 2024

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: apk-tools
New template parameter 1 only: apk-tools

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

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: First parameter cannot be undefined or empty in template: Template:Pkg

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

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

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

empty branch parameter
old template: apk-tools
new template: apk-tools

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"
pipewire*

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

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!):
*alsa*