Template:Tnm/testcases
From Gentoo Wiki
Jump to:navigation
Jump to:search
Note
This is the template test case page for Template:Tnm and its sandbox version. The page may need to be refreshed to update the examples (click "Refresh" from the "More" menu).
This is the template test case page for Template:Tnm and its sandbox version. The page may need to be refreshed to update the examples (click "Refresh" from the "More" menu).
Correct
One anonymous parameter: name of a template, whether it exists or not
Wiki code
{{Tnm|RootCmd}}
Main version
{{RootCmd}}
Sandbox version
One anonymous parameter containing a pipe character (illustrating a template call with a parameter)
Wiki code
{{Tnm|RootCmd{{!}}umount /mnt/gentoo}}
Main version
{{RootCmd|umount /mnt/gentoo}}
Sandbox version
↑ Note that this is OK when using this template, but will not work with the {{Tlm}} template.
One anonymous parameter containing a pipe and equals sign (illustrating a template call with named parameter)
Wiki code
{{Tnm|RootCmd{{!}}umount /mnt/gentoo{{!}}prompt{{=}}#}}
Main version
{{RootCmd|umount /mnt/gentoo|prompt=#}}
Sandbox version
↑ Note that this will not work when using the {{Tlm}} template.
Incorrect
No parameter (error message)
Wiki code
{{Tnm}}
Main version
{{Tnm template error}}
Parameter 1 not defined. For correct usage see Tnm template's documentation on the
1
parameter.Sandbox version
Multiple anonymous parameters (not supported yet)
Wiki code
{{Tnm|RootCmd|umount /mnt/gentoo}}
Main version
{{RootCmd}}
Sandbox version