Template:FileBox/testcases: Difference between revisions

From HPC Wiki
Jump to:navigation Jump to:search
(Created page with "<noinclude>{{Template testcases notice}}</noinclude> {{Testcase|title=No parameter |<nowiki>{{FileBox}}</nowiki> |{{XYZ}} |{{XYZ/sandbox}} }} {{Testcase |title=Parameters: fi...")
 
No edit summary
Line 10: Line 10:
|<nowiki>{{FileBox|filename=/tmp/file|1=Some text/code.}}</nowiki>
|<nowiki>{{FileBox|filename=/tmp/file|1=Some text/code.}}</nowiki>
|{{FileBox|filename=File|1=Some text/code.}}
|{{FileBox|filename=File|1=Some text/code.}}
|{{FileBox|filename=File|1=Some text/code.}}
|{{FileBox/sandbox|filename=File|1=Some text/code.}}
}}
}}


Line 17: Line 17:
|<nowiki>{{FileBox|title=FileBox example|1=Some text/code.}}</nowiki>
|<nowiki>{{FileBox|title=FileBox example|1=Some text/code.}}</nowiki>
|{{FileBox|title=FileBox example|1=Some text/code.}}
|{{FileBox|title=FileBox example|1=Some text/code.}}
|{{FileBox|title=FileBox example|1=Some text/code.}}
|{{FileBox/sandbox|title=FileBox example|1=Some text/code.}}
}}
}}


Line 24: Line 24:
|<nowiki>{{FileBox|title=FileBox example|filename=/tmp/file|1=Some text/code.}}</nowiki>
|<nowiki>{{FileBox|title=FileBox example|filename=/tmp/file|1=Some text/code.}}</nowiki>
|{{FileBox|title=FileBox example|filename=/tmp/file|1=Some text/code.}}
|{{FileBox|title=FileBox example|filename=/tmp/file|1=Some text/code.}}
|{{FileBox|title=FileBox example|filename=/tmp/file|1=Some text/code.}}
|{{FileBox/sandbox|title=FileBox example|filename=/tmp/file|1=Some text/code.}}
}}
}}


Line 35: Line 35:
echo "Hello, world!"
echo "Hello, world!"
}}
}}
|{{FileBox|title=FileBox example|filename=/tmp/file|lang=bash|1=#!/bin/bash
|{{FileBox/sandbox|title=FileBox example|filename=/tmp/file|lang=bash|1=#!/bin/bash
echo "Hello, world!"
echo "Hello, world!"
}}
}}
}}
}}

Revision as of 14:32, 15 December 2016

No parameter
Wiki code {{FileBox}}

Main version Template:XYZ
Sandbox version Template:XYZ/sandbox
Parameters: filename=/tmp/file, 1=Some text/code.
Wiki code {{FileBox|filename=/tmp/file|1=Some text/code.}}

Main version
FILE File
Some text/code.
Sandbox version
{{{title}}}
Some text/code.
Parameters: title=FileBox example, 1=Some text/code.
Wiki code {{FileBox|title=FileBox example|1=Some text/code.}}

Main version
FILE {{{filename}}}FileBox example
Some text/code.
Sandbox version
FileBox example
Some text/code.
Parameters: title=FileBox example, filename=/tmp/file, 1=Some text/code.
Wiki code {{FileBox|title=FileBox example|filename=/tmp/file|1=Some text/code.}}

Main version
FILE /tmp/fileFileBox example
Some text/code.
Sandbox version
FileBox example
Some text/code.
Parameters: title=FileBox example, filename=/tmp/file, lang=bash, 1=#!/bin/bash echo "Hello, world!"
Wiki code {{FileBox|title=FileBox example|filename=/tmp/file|lang=bash|1=#!/bin/bash echo "Hello, world!" }}

Main version
FILE /tmp/fileFileBox example
#!/bin/bash
echo "Hello, world!"
Sandbox version
FileBox example
#!/bin/bash
echo "Hello, world!"