Redigerer
Mal:Test case/dok
(avsnitt)
Hopp til navigering
Hopp til søk
Advarsel:
Du er ikke innlogget. IP-adressen din vil bli vist offentlig om du redigerer. Hvis du
logger inn
eller
oppretter en konto
vil redigeringene dine tilskrives brukernavnet ditt, og du vil få flere andre fordeler.
Antispamsjekk.
Ikke
fyll inn dette feltet!
== <div id="Test case formats" ></div>Test case formats == === <div id="Default" ></div>Default format === This format is used when '''{{code|_format}}''' is not specified or when '''{{para|_format|default}}'''. It does not have any extra parameters. '''Example''' {{test case|_template1=ombox|text=Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.}} === <div id="Columns" ></div>Columns format === Use '''{{para|_format|columns}}''' to arrange the test cases side by side in a table. This is useful for comparing long and thin templates such as infoboxes. It has the following extra parameters: {| class="wikitable" |- ! Parameter !! Description |- | <code>_class</code> || HTML classes for the table. Use {{para|_class|wikitable}} to format the table as a wikitable. |- | <code>_style</code> || Custom inline CSS for the table. |- | <code>_caption</code> || Custom caption for the table. The default is "Side by side comparison". |- | <code>_rowheader</code> || An extra heading for the row containing the templates. |- | <code>_heading0</code> || If _rowheader is supplied, this is an optional heading above it in the template row. |- | <code>_before</code> || This text is displayed before the output of each template. |- | <code>_after</code> || This text is displayed after the output of each template. |} '''Example''' {{test case|_template1=ombox|_format=columns|text=Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.}} === <div id="Rows and tablerows" ></div>Rows and tablerows formats === Use '''{{para|_format|rows}}''' or '''{{para|_format|tablerows}}''' to arrange the test cases one above another in a table. These two formats differ in the placement of the headings: '''{{code|rows}}''' puts them above, whereas '''{{code|tablerows}}''' to the left of the template outputs. It has the following extra parameters: {| class="wikitable" |- ! Parameter !! Description |- | <code>_class</code> || HTML classes for the table. Use {{para|_class|wikitable}} to format the table as a wikitable. |- | <code>_style</code> || Custom inline CSS for the table. |- | <code>_caption</code> || Custom caption for the table. |} '''Example – rows''' {{test case|_template1=ombox|_format=rows|text=Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.}} '''Example – tablerows''' {{test case|_template1=ombox|_format=tablerows|text=Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.}} === <div id="Inline" ></div>Inline format === Use '''{{Para|_format|inline}}''' for test cases that can be displayed entirely on one line. If used with templates that display on multiple lines it may produce unexpected results. This format creates a [[Help:Wikitext#Unordered lists|bulleted list]] by placing <code>*</code> before each line of output. It has the following extra parameters: {| class="wikitable" |- ! Parameter !! Description |- | <code>_addline</code> || Text to be added as last line in list, after the template output. |- | <code>_prefix</code> || Character to replace <code>*</code> before each line of output. Using {{para|_prefix|#}} would display a [[Help:Wikitext#Ordered lists|numbered list]]. |} Note: As this format starts with a bullet, a newline will always be inserted at the start of the template output due to [[phab:T14974|bug 14974]]. '''Examples''' (using [[Template:3x]]) Default: {{test case|_format=inline|_template1=3x|Lorem ipsum }} With '''{{para|_showcode|yes}}''': {{test case|_format=inline|_showcode=yes|_template1=3x|Lorem ipsum }} '''Example''' (using [[Template:Height]]) With '''{{para|_prefix|#}}''' and '''{{para|_addline}}''': {{test case |_format=inline |_prefix=# |_showcode=yes |_template=Height |m=1.51 |_addline=<code><nowiki>{{Cvt|1.51|m|frac=2}}</nowiki></code> → {{Cvt|1.51|m|frac=2}} }}
Redigeringsforklaring:
Merk at alle bidrag til Wikisida.no anses som frigitt under Creative Commons Navngivelse-DelPåSammeVilkår (se
Wikisida.no:Opphavsrett
for detaljer). Om du ikke vil at ditt materiale skal kunne redigeres og distribueres fritt må du ikke lagre det her.
Du lover oss også at du har skrevet teksten selv, eller kopiert den fra en kilde i offentlig eie eller en annen fri ressurs.
Ikke lagre opphavsrettsbeskyttet materiale uten tillatelse!
Avbryt
Redigeringshjelp
(åpnes i et nytt vindu)
Forhåndsvis en side som bruker denne malen
Denne siden er medlem av 1 skjult kategori:
Kategori:Sider hvor ekspansjonsdybden er overskredet
Navigasjonsmeny
Personlige verktøy
Ikke logget inn
Brukerdiskusjon
Bidrag
Opprett konto
Logg inn
Navnerom
Mal
Diskusjon
norsk bokmål
Visninger
Les
Rediger kilde
Vis historikk
Mer
Navigasjon
Forside
Siste endringer
Tilfeldig side
Hjelp til MediaWiki
Verktøy
Lenker hit
Relaterte endringer
Spesialsider
Sideinformasjon