Template:Package/testcases

From Gentoo Wiki
Jump to:navigation Jump to:search

Test cases

Note
This is the template test case page for Template:Package and its sandbox version. You may have to purge this page to update the examples.

Correct

One anonymous parameter matching a Portage category + package name
Wiki code
{{Package|sys-apps/portage}}
Main version
Install the sys-apps/portage package for a great computing experience!
Sandbox version
Install the sys-apps/portage package for a great computing experience!


A package from a third-party repository
Wiki code
{{Package|app-office/obsidian|url=https://github.com/gentoo/guru/tree/master/}}
Main version
Try out app-office/obsidian from GURU!
Sandbox version
Try out app-office/obsidian from GURU!


Anonymous parameter matching a Portage category + package name, and a version parameter
Wiki code
{{Package|sys-devel/gcc|version=13.2.1_p20240210}}
Main version
sys-devel/gcc-13.2.1_p20240210 is the latest stable version of GCC
Sandbox version
sys-devel/gcc-13.2.1_p20240210 is the latest stable version of GCC


Anonymous parameter matching a Portage category + package name, and a slot parameter
Wiki code
{{Package|sys-devel/gcc|slot=13}}
Main version
sys-devel/gcc:12 and sys-devel/gcc:13 can both be installed on the same system
Sandbox version
sys-devel/gcc:12 and sys-devel/gcc:13 can both be installed on the same system


Anonymous parameter matching a Portage category + package name, a version parameter, and a slot parameter
Wiki code
{{Package|sys-devel/gcc|version=13.2.1_p20240113-r1|slot=13}}
Main version
Users should try upgrading to sys-devel/gcc-13.2.1_p20240113-r1:13.
Sandbox version
Users should try upgrading to sys-devel/gcc-13.2.1_p20240113-r1:13.


Incorrect

One anonymous parameter not matching a Portage category + package name (broken link)
Wiki code
{{Package|portage}}
Main version
Sandbox version


No parameter (error message)
Wiki code
{{Package}}
Main version
{{Package template error}}
Parameter 1 not defined. For correct usage see Package template's documentation on the 1 parameter.
Sandbox version
{{Package template error}}
Parameter 1 not defined. For correct usage see Package template's documentation on the 1 parameter.