Module:Random/testcases
Appearance
This is the template test cases page for the sandbox of Module:Random. to update the examples. If there are many examples of a complicated template, later ones may break due to limits in MediaWiki; see the HTML comment "NewPP limit report" in the rendered page. You can also use Special:ExpandTemplates to examine the results of template uses. You can test how this page looks in the different skins and parsers with these links: |
Number
[edit]Code | Main | Sandbox |
---|---|---|
{{#invoke:random|number}}
|
0.0072672851417527 | 0.15577054450091 |
{{#invoke:random|number|10}}
|
9 | 7 |
{{#invoke:random|number|10|20}}
|
18 | 14 |
{{#invoke:random|number|500000}}
|
278750 | 12845 |
{{#invoke:random|number|-10}}
|
0 | -2 |
{{#invoke:random|number|20|10}}
|
15 | 19 |
{{#invoke:random|number|-100|-50}}
|
-90 | -72 |
{{#invoke:random|number|6.5}}
|
6 | 3 |
{{#invoke:random|number|-6.5}}
|
-4 | -5 |
{{#invoke:random|number|-16.5|-6.5}}
|
-10.5 | -13.5 |
- Test randomness with the same input
Code | Main | Sandbox |
---|---|---|
{{#invoke:random|number}}
|
0.21166974688492 | 0.60405499004016 |
{{#invoke:random|number}}
|
0.99741774937018 | 0.80443063788322 |
{{#invoke:random|number}}
|
0.97935813385032 | 0.37592568731677 |
{{#invoke:random|number}}
|
0.11029005893985 | 0.088048132643126 |
{{#invoke:random|number}}
|
0.23752795450274 | 0.62991415086664 |
{{#invoke:random|number}}
|
0.023275956056675 | 0.0010340297599482 |
{{#invoke:random|number}}
|
0.80853519998888 | 0.20140967760301 |
{{#invoke:random|number}}
|
0.0084220892788945 | 0.15790238797567 |
{{#invoke:random|number}}
|
0.72152109757137 | 0.69976792936203 |
{{#invoke:random|number}}
|
0.12178363423878 | 0.10002951235512 |
{{#invoke:random|number|1000}}
|
996 | 783 |
{{#invoke:random|number|1000}}
|
131 | 477 |
{{#invoke:random|number|1000}}
|
866 | 729 |
{{#invoke:random|number|1000}}
|
362 | 74 |
{{#invoke:random|number|1000}}
|
296 | 525 |
{{#invoke:random|number|1000}}
|
311 | 101 |
{{#invoke:random|number|1000}}
|
706 | 221 |
{{#invoke:random|number|1000}}
|
53 | 831 |
{{#invoke:random|number|1000}}
|
617 | 423 |
{{#invoke:random|number|1000}}
|
305 | 795 |
Same number
[edit]Code | Main | Sandbox |
---|---|---|
{{#invoke:random|number|same=yes}}
|
0.90019102157102 | 0.90019102157102 |
{{#invoke:random|number|same=yes|10}}
|
3 | 3 |
{{#invoke:random|number|same=yes|10|20}}
|
12 | 12 |
{{#invoke:random|number|same=yes|500000}}
|
106823 | 106823 |
{{#invoke:random|number|same=yes|-10}}
|
-2 | -2 |
{{#invoke:random|number|same=yes|20|10}}
|
12 | 12 |
{{#invoke:random|number|same=yes|-100|-50}}
|
-90 | -90 |
{{#invoke:random|number|same=yes|6.5}}
|
2 | 2 |
{{#invoke:random|number|same=yes|-6.5}}
|
-1 | -1 |
{{#invoke:random|number|same=yes|-16.5|-6.5}}
|
-14.5 | -14.5 |
- Test randomness with the same input
Code | Main | Sandbox |
---|---|---|
{{#invoke:random|number|same=yes}}
|
0.90019102157102 | 0.90019102157102 |
{{#invoke:random|number|same=yes}}
|
0.90019102157102 | 0.90019102157102 |
{{#invoke:random|number|same=yes}}
|
0.90019102157102 | 0.90019102157102 |
{{#invoke:random|number|same=yes}}
|
0.90019102157102 | 0.90019102157102 |
{{#invoke:random|number|same=yes}}
|
0.90019102157102 | 0.90019102157102 |
{{#invoke:random|number|same=yes}}
|
0.90019102157102 | 0.90019102157102 |
{{#invoke:random|number|same=yes}}
|
0.90019102157102 | 0.90019102157102 |
{{#invoke:random|number|same=yes}}
|
0.90019102157102 | 0.90019102157102 |
{{#invoke:random|number|same=yes}}
|
0.90019102157102 | 0.90019102157102 |
{{#invoke:random|number|same=yes}}
|
0.90019102157102 | 0.90019102157102 |
{{#invoke:random|number|same=yes|1000}}
|
214 | 214 |
{{#invoke:random|number|same=yes|1000}}
|
214 | 214 |
{{#invoke:random|number|same=yes|1000}}
|
214 | 214 |
{{#invoke:random|number|same=yes|1000}}
|
214 | 214 |
{{#invoke:random|number|same=yes|1000}}
|
214 | 214 |
{{#invoke:random|number|same=yes|1000}}
|
214 | 214 |
{{#invoke:random|number|same=yes|1000}}
|
214 | 214 |
{{#invoke:random|number|same=yes|1000}}
|
214 | 214 |
{{#invoke:random|number|same=yes|1000}}
|
214 | 214 |
{{#invoke:random|number|same=yes|1000}}
|
214 | 214 |
Date
[edit]Code | Main | Sandbox |
---|---|---|
{{#invoke:random|date}}
|
07:57, 31 March 2024 (UTC) | 00:42, 26 January 2024 (UTC) |
{{#invoke:random|date|1 Jan 2000}}
|
12:22, 25 March 1989 (UTC) | 22:04, 28 April 1970 (UTC) |
{{#invoke:random|date|1 Jan 2000|27 July 2176}}
|
22:47, 14 July 2127 (UTC) | 21:52, 15 December 2166 (UTC) |
{{#invoke:random|date|1000|2000|format=Y}}
|
1406 | 1794 |
{{#invoke:random|date|2000|1000|format=Y}}
|
Module:Random error: the start date must not be later than the end date (start date: "2000", end date: "1000"). | Module:Random error: the start date must not be later than the end date (start date: "2000", end date: "1000"). |
{{#invoke:random|date|format=Y/m/d H:i}}
|
2024/04/29 13:29 | 2024/05/08 10:22 |
Item
[edit]Code | Main | Sandbox |
---|---|---|
{{#invoke:random|item|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
|
beans | beans |
{{#invoke:random|item|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
|
sausage | Lobster Thermidor |
List
[edit]Code | Main | Sandbox |
---|---|---|
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
|
Lobster Thermidorbaconbeanssausageeggspam | Lobster Thermidorbaconspambeanssausageegg |
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
|
eggbeansLobster Thermidorspambaconsausage | beansLobster Thermidoreggbaconspamsausage |
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=dot}}
|
spam · sausage · egg · Lobster Thermidor · beans · bacon | sausage · beans · Lobster Thermidor · spam · bacon · egg |
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=pipe}}
|
spam | Lobster Thermidor | bacon | sausage | egg | spam | egg | bacon | sausage | beans |
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=comma}}
|
sausage, bacon, egg, spam, Lobster Thermidor, beans | beans, Lobster Thermidor, bacon, sausage, egg, spam |
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=tpt-languages}}
|
Lobster Thermidor⧼tpt-languages-separator⧽bacon⧼tpt-languages-separator⧽egg⧼tpt-languages-separator⧽spam⧼tpt-languages-separator⧽beans⧼tpt-languages-separator⧽sausage | beans⧼tpt-languages-separator⧽sausage⧼tpt-languages-separator⧽spam⧼tpt-languages-separator⧽egg⧼tpt-languages-separator⧽bacon⧼tpt-languages-separator⧽Lobster Thermidor |
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=space}}
|
egg beans Lobster Thermidor spam sausage bacon | spam sausage Lobster Thermidor egg beans bacon |
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=...}}
|
spam...bacon...sausage...Lobster Thermidor...egg...beans | sausage...Lobster Thermidor...beans...spam...bacon...egg |
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|limit=4}}
|
eggbeansbaconspam | eggbaconspamLobster Thermidor |
Text list
[edit]Code | Main | Sandbox |
---|---|---|
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
|
spam, Lobster Thermidor, bacon, sausage, egg and beans | spam, bacon, Lobster Thermidor, egg, beans and sausage |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
|
sausage, spam, beans, egg, Lobster Thermidor and bacon | bacon, sausage, beans, spam, egg and Lobster Thermidor |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=dot}}
|
beans · egg · Lobster Thermidor · spam · bacon and sausage | egg · bacon · spam · Lobster Thermidor · sausage and beans |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=pipe}}
|
egg | sausage | spam | Lobster Thermidor and bacon | beans | bacon | sausage | spam and egg |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=comma}}
|
spam, sausage, egg, bacon, Lobster Thermidor and beans | sausage, bacon, beans, spam, Lobster Thermidor and egg |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=tpt-languages}}
|
Lobster Thermidor⧼tpt-languages-separator⧽spam⧼tpt-languages-separator⧽sausage⧼tpt-languages-separator⧽beans⧼tpt-languages-separator⧽bacon and egg | beans⧼tpt-languages-separator⧽bacon⧼tpt-languages-separator⧽sausage⧼tpt-languages-separator⧽Lobster Thermidor⧼tpt-languages-separator⧽egg and spam |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=space}}
|
egg beans bacon Lobster Thermidor spam and sausage | Lobster Thermidor beans spam egg sausage and bacon |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=...}}
|
sausage...beans...bacon...spam...egg and Lobster Thermidor | sausage...bacon...egg...spam...beans and Lobster Thermidor |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=space|conj=...}}
|
beans bacon egg sausage spam...Lobster Thermidor | spam bacon beans egg sausage...Lobster Thermidor |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|conj=... and }}
|
spam, sausage, beans, Lobster Thermidor, bacon... and egg | egg, beans, sausage, bacon, Lobster Thermidor... and spam |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|limit=4}}
|
egg, Lobster Thermidor, bacon and spam | spam, sausage, bacon and Lobster Thermidor |
Bulleted list
[edit]Code | Main | Sandbox |
---|---|---|
{{#invoke:random|bulleted_list|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
|
|
|
{{#invoke:random|bulleted_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|style=color: green}}
|
|
|
{{#invoke:random|bulleted_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|item2_style=color: green|item4_style=color: orange}}
|
|
|
{{#invoke:random|bulleted_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|limit=4}}
|
|
|
Unbulleted list
[edit]Code | Main | Sandbox |
---|---|---|
{{#invoke:random|unbulleted_list|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
|
|
|
{{#invoke:random|unbulleted_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|style=color: green}}
|
|
|
{{#invoke:random|unbulleted_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|item2_style=color: green|item4_style=color: orange}}
|
|
|
{{#invoke:random|unbulleted_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|limit=4}}
|
|
|
Horizontal list
[edit]Code | Main | Sandbox |
---|---|---|
{{#invoke:random|horizontal_list|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
|
|
|
{{#invoke:random|horizontal_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|style=color: green}}
|
|
|
{{#invoke:random|horizontal_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|item2_style=color: green|item4_style=color: orange}}
|
|
|
{{#invoke:random|horizontal_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|limit=4}}
|
|
|
Ordered list
[edit]Code | Main | Sandbox |
---|---|---|
{{#invoke:random|ordered_list|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
|
|
|
{{#invoke:random|ordered_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|style=color: green}}
|
|
|
{{#invoke:random|ordered_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|item2_style=color: green|item4_style=color: orange}}
|
|
|
{{#invoke:random|ordered_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|list_style_type=lower greek}}
|
|
|
{{#invoke:random|ordered_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|type=I}}
|
|
|
{{#invoke:random|ordered_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|limit=4}}
|
|
|
Horizontal ordered list
[edit]Code | Main | Sandbox |
---|---|---|
{{#invoke:random|horizontal_ordered_list|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
|
|
|
{{#invoke:random|horizontal_ordered_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|style=color: green}}
|
|
|
{{#invoke:random|horizontal_ordered_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|item2_style=color: green|item4_style=color: orange}}
|
|
|
{{#invoke:random|horizontal_ordered_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|limit=4}}
|
|
|
Random link
[edit]Code | Main | Sandbox |
---|---|---|
{{#invoke:random|link|Aristotle}}
|
Script error: The function "link" does not exist. | Script error: The function "link" does not exist. |