Template:PreBox/testcases

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

Main version
{{{title}}}
foo
Sandbox version
{{{title}}}
foo


Named parameter title, unnamed parameter with value foo
Wiki code {{PreBox|title=bar|foo}}

Main version
bar
foo
Sandbox version
bar
foo


title=bar, collapse-output=true, unnamed parameter with value foo
Wiki code {{PreBox|title=bar|collapse-output=true|foo}}

Main version
bar
foo
Sandbox version
bar
foo


title=bar, collapse-output=true, multi-line unnamed parameter with value "foo\nfuton\nfoo-fighters"
Wiki code {{PreBox|title=bar|collapse-output=true|foo \nfuton \nfoo-fighters }}

Main version
bar
foo
futon
foo-fighters
Sandbox version
bar
foo
futon
foo-fighters


title=bar, collapse-output=true, multi-line unnamed parameter passed as 1= with the values of "foo\nfuton\nfoo-fighters"
Wiki code {{PreBox|title=bar|collapse-output=true|1=foo \nfuton \nfoo-fighters }}

Main version
bar
foo
futon
foo-fighters
Sandbox version
bar
foo
futon
foo-fighters


language test
Wiki code {{PreBox|title=bash syntax|lang=bash|1=src_install() { \n local foo=$bar \n default \n} \nexec /bin/init }}

Main version
bash syntax
src_install() {
  local foo=$bar
  default
}
exec /bin/init
Sandbox version
bash syntax
src_install() {
  local foo=$bar
  default
}
exec /bin/init