Template:Color/testcases

From Gentoo Wiki
Jump to: navigation, search
Note
This is the template test case page for Template:Color and its sandbox version. You may have to purge this page to update the examples.

Correct

Two anonymous parameters, the color and the text to be colored
Wiki code
{{Color|green|everything's fine}}
Main version
everything's fine
Sandbox version


Empty first anonymous parameter (uses the default color, black)
Wiki code
{{Color||OK, but useless}}
Main version
OK, but useless
Sandbox version


Incorrect

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


One anonymous parameter (colored error message)
Wiki code
{{Color|green}}
Main version
{{Color template error}}
Parameter 1 not defined. For correct usage see Color template's documentation on the 1 parameter.
Sandbox version