Template:Cmd/testcases

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

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 1 not defined. For correct usage see Cmd template's documentation on the 1 parameter.



Parameter: 1. unnamed
Wiki code {{Cmd|a command}}

Main version
user $a command
Sandbox version
user $a command


Parameter: unnamed with the special characters "=" and "|"
Wiki code {{Cmd|a command with {{=}} and {{!}}}}

Main version
Sandbox version


Parameter: output
Wiki code {{Cmd|a command|output=<pre> Some output </pre>}}

Main version
user $a command
Some output
Sandbox version
user $a command
Some output


Parameters: output, collapse-output
Wiki code {{Cmd |ls -l /sys |collapse-output=true |output=<pre> total 0 drwxr-xr-x 2 root root 0 Jun 28 14:42 block drwxr-xr-x 30 root root 0 May 31 13:51 bus drwxr-xr-x 68 root root 0 May 31 13:51 class drwxr-xr-x 4 root root 0 May 31 13:51 dev drwxr-xr-x 23 root root 0 May 31 13:51 devices drwxr-xr-x 6 root root 0 May 31 13:51 firmware drwxr-xr-x 14 root root 0 May 31 13:51 fs drwxr-xr-x 11 root root 0 May 31 13:51 kernel drwxr-xr-x 281 root root 0 May 31 13:51 module drwxr-xr-x 2 root root 0 Jun 28 14:42 power </pre> }}

Main version
user $ls -l /sys
total 0
drwxr-xr-x   2 root root 0 Jun 28 14:42 block
drwxr-xr-x  30 root root 0 May 31 13:51 bus
drwxr-xr-x  68 root root 0 May 31 13:51 class
drwxr-xr-x   4 root root 0 May 31 13:51 dev
drwxr-xr-x  23 root root 0 May 31 13:51 devices
drwxr-xr-x   6 root root 0 May 31 13:51 firmware
drwxr-xr-x  14 root root 0 May 31 13:51 fs
drwxr-xr-x  11 root root 0 May 31 13:51 kernel
drwxr-xr-x 281 root root 0 May 31 13:51 module
drwxr-xr-x   2 root root 0 Jun 28 14:42 power
Sandbox version
user $ls -l /sys
total 0
drwxr-xr-x   2 root root 0 Jun 28 14:42 block
drwxr-xr-x  30 root root 0 May 31 13:51 bus
drwxr-xr-x  68 root root 0 May 31 13:51 class
drwxr-xr-x   4 root root 0 May 31 13:51 dev
drwxr-xr-x  23 root root 0 May 31 13:51 devices
drwxr-xr-x   6 root root 0 May 31 13:51 firmware
drwxr-xr-x  14 root root 0 May 31 13:51 fs
drwxr-xr-x  11 root root 0 May 31 13:51 kernel
drwxr-xr-x 281 root root 0 May 31 13:51 module
drwxr-xr-x   2 root root 0 Jun 28 14:42 power


Parameters: prompt, color
Wiki code {{Cmd |a command |prompt=example ? |color=lightblue }}

Main version
example ?a command
Sandbox version
example ?a command


Parameter: unnamed (10x)
Wiki code {{Cmd |1. command |... |10. command }}

Main version
user $1. command
user $2. command
user $3. command
user $4. command
user $5. command
user $6. command
user $7. command
user $8. command
user $9. command
user $10. command
Sandbox version
user $1. command
user $2. command
user $3. command
user $4. command
user $5. command
user $6. command
user $7. command
user $8. command
user $9. command
user $10. command



Parameter: unnamed (11x)
Wiki code {{Cmd |1. command |... |11. command }}

Main version
{{Cmd template error}}
Too many anonymous parameters. Maximum is 11. For correct usage see Cmd template's documentation on the 11 parameter.
Sandbox version
{{Cmd template error}}
Too many anonymous parameters. Maximum is 11. For correct usage see Cmd template's documentation on the 11 parameter.