Template:Tnc/testcases

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

Correct

One anonymous parameter: name of a template, whether it exists or not
Wiki code
{{Tnc|RootCmd}}
Main version
{{RootCmd}}
Sandbox version


One anonymous parameter containing a pipe character (illustrating a template call with a parameter)
Wiki code
{{Tnc|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 {{Tlc}} template.


One anonymous parameter containing a pipe and equals sign (illustrating a template call with named parameter)
Wiki code
{{Tnc|RootCmd{{!}}umount /mnt/gentoo{{!}}prompt{{=}}#}}
Main version
{{RootCmd|umount /mnt/gentoo|prompt=#}}
Sandbox version


↑ Note that this will not work when using the {{Tlc}} template.

Incorrect

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


Multiple anonymous parameters (not supported yet)
Wiki code
{{Tnc|RootCmd|umount /mnt/gentoo}}
Main version
{{RootCmd}}
Sandbox version