Template:Invocation/testcases

From Gentoo Wiki
Jump to:navigation Jump to:search
Note
This is the template test case page for Template:Invocation and its sandbox version. The page may need to be refreshed to update the examples (click "Refresh" from the "More" menu).
CollapseParameter: 1. unnamed
Wiki code {{Invocation|command -h}}

Main version
user $command -h
Sandbox version
user $command -h
CollapseParameter: unnamed with the special characters "=" and "|"
Wiki code {{Invocation|command with help{{=}}true and help{{!}}false}}

Main version
user $command help=true and help|false
Sandbox version
user $command help=true and help|false
CollapseParameter: output
Wiki code {{Invocation|command -h|output=<pre> Some output </pre>}}

Main version
user $command -h
Sandbox version
user $command -h
CollapseParameter: prompt, color
Wiki code {{Invocation |command -h |prompt=example ? |color=lightblue }}

Main version
example ?command -h
Sandbox version
example ?command -h
CollapseParameter: unnamed (1x)
Wiki code {{Invocation |command 1 -h }}

Main version
user $command 1 -h
Sandbox version
user $command 1 -h

Incorrect usage

CollapseNo parameter
Wiki code {{Invocation}}

Main version
{{Cmd template error}}
Parameter 1 not defined. For correct usage see Cmd template's documentation on the 1 parameter.
Sandbox version
{{Cmd template error}}
Parameter unnamed not defined. For correct usage see Cmd template's documentation on the unnamed parameter.
CollapseParameter: unnamed (2x)
Wiki code {{Invocation |command 1 -h |command 2 -h }}

Main version
{{Cmd template error}}
Parameter 2 not defined. For correct usage see Cmd template's documentation on the 2 parameter.
Sandbox version
{{Cmd template error}}
Parameter 2 not defined. For correct usage see Cmd template's documentation on the 2 parameter.