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.52935146052826 | 0.068011730475357 |
{{#invoke:random|number|10}}
|
6 | 2 |
{{#invoke:random|number|10|20}}
|
18 | 20 |
{{#invoke:random|number|500000}}
|
78200 | 344710 |
{{#invoke:random|number|-10}}
|
-5 | -2 |
{{#invoke:random|number|20|10}}
|
14 | 15 |
{{#invoke:random|number|-100|-50}}
|
-95 | -86 |
{{#invoke:random|number|6.5}}
|
6 | 1 |
{{#invoke:random|number|-6.5}}
|
-1 | -2 |
{{#invoke:random|number|-16.5|-6.5}}
|
-15.5 | -13.5 |
- Test randomness with the same input
Code | Main | Sandbox |
---|---|---|
{{#invoke:random|number}}
|
0.94857242701043 | 0.31550999512687 |
{{#invoke:random|number}}
|
0.024426692176809 | 0.39234130009652 |
{{#invoke:random|number}}
|
0.028609002953679 | 0.86107004334269 |
{{#invoke:random|number}}
|
0.057750707053463 | 0.25394356728249 |
{{#invoke:random|number}}
|
0.035997062472625 | 0.81756275371535 |
{{#invoke:random|number}}
|
0.014243894263284 | 0.79629738991908 |
{{#invoke:random|number}}
|
0.99249024968245 | 0.18868263260866 |
{{#invoke:random|number}}
|
0.79950313819549 | 0.99569599795886 |
{{#invoke:random|number}}
|
0.19286542022269 | 0.38905827998605 |
{{#invoke:random|number}}
|
0.14935860743251 | 0.93092382183807 |
{{#invoke:random|number|1000}}
|
230 | 845 |
{{#invoke:random|number|1000}}
|
18 | 632 |
{{#invoke:random|number|1000}}
|
806 | 419 |
{{#invoke:random|number|1000}}
|
19 | 13 |
{{#invoke:random|number|1000}}
|
917 | 110 |
{{#invoke:random|number|1000}}
|
286 | 459 |
{{#invoke:random|number|1000}}
|
510 | 152 |
{{#invoke:random|number|1000}}
|
13 | 940 |
{{#invoke:random|number|1000}}
|
555 | 986 |
{{#invoke:random|number|1000}}
|
901 | 74 |
Same number
[edit]Code | Main | Sandbox |
---|---|---|
{{#invoke:random|number|same=yes}}
|
0.9451089733956 | 0.9451089733956 |
{{#invoke:random|number|same=yes|10}}
|
8 | 8 |
{{#invoke:random|number|same=yes|10|20}}
|
17 | 17 |
{{#invoke:random|number|same=yes|500000}}
|
359319 | 359319 |
{{#invoke:random|number|same=yes|-10}}
|
-7 | -7 |
{{#invoke:random|number|same=yes|20|10}}
|
17 | 17 |
{{#invoke:random|number|same=yes|-100|-50}}
|
-64 | -64 |
{{#invoke:random|number|same=yes|6.5}}
|
5 | 5 |
{{#invoke:random|number|same=yes|-6.5}}
|
-4 | -4 |
{{#invoke:random|number|same=yes|-16.5|-6.5}}
|
-9.5 | -9.5 |
- Test randomness with the same input
Code | Main | Sandbox |
---|---|---|
{{#invoke:random|number|same=yes}}
|
0.9451089733956 | 0.9451089733956 |
{{#invoke:random|number|same=yes}}
|
0.9451089733956 | 0.9451089733956 |
{{#invoke:random|number|same=yes}}
|
0.9451089733956 | 0.9451089733956 |
{{#invoke:random|number|same=yes}}
|
0.9451089733956 | 0.9451089733956 |
{{#invoke:random|number|same=yes}}
|
0.9451089733956 | 0.9451089733956 |
{{#invoke:random|number|same=yes}}
|
0.9451089733956 | 0.9451089733956 |
{{#invoke:random|number|same=yes}}
|
0.9451089733956 | 0.9451089733956 |
{{#invoke:random|number|same=yes}}
|
0.9451089733956 | 0.9451089733956 |
{{#invoke:random|number|same=yes}}
|
0.9451089733956 | 0.9451089733956 |
{{#invoke:random|number|same=yes}}
|
0.9451089733956 | 0.9451089733956 |
{{#invoke:random|number|same=yes|1000}}
|
719 | 719 |
{{#invoke:random|number|same=yes|1000}}
|
719 | 719 |
{{#invoke:random|number|same=yes|1000}}
|
719 | 719 |
{{#invoke:random|number|same=yes|1000}}
|
719 | 719 |
{{#invoke:random|number|same=yes|1000}}
|
719 | 719 |
{{#invoke:random|number|same=yes|1000}}
|
719 | 719 |
{{#invoke:random|number|same=yes|1000}}
|
719 | 719 |
{{#invoke:random|number|same=yes|1000}}
|
719 | 719 |
{{#invoke:random|number|same=yes|1000}}
|
719 | 719 |
{{#invoke:random|number|same=yes|1000}}
|
719 | 719 |
Date
[edit]Code | Main | Sandbox |
---|---|---|
{{#invoke:random|date}}
|
07:14, 14 July 2024 (UTC) | 07:26, 15 March 2024 (UTC) |
{{#invoke:random|date|1 Jan 2000}}
|
13:35, 11 February 1987 (UTC) | 17:30, 24 June 1999 (UTC) |
{{#invoke:random|date|1 Jan 2000|27 July 2176}}
|
19:21, 26 September 2063 (UTC) | 23:58, 03 January 2033 (UTC) |
{{#invoke:random|date|1000|2000|format=Y}}
|
1999 | 1495 |
{{#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/05/02 23:46 | 2024/04/10 12:11 |
Item
[edit]Code | Main | Sandbox |
---|---|---|
{{#invoke:random|item|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
|
spam | sausage |
{{#invoke:random|item|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
|
bacon | egg |
List
[edit]Code | Main | Sandbox |
---|---|---|
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
|
baconLobster Thermidorspameggsausagebeans | sausagebeanseggbaconLobster Thermidorspam |
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
|
spameggsausagebaconLobster Thermidorbeans | baconbeansspameggLobster Thermidorsausage |
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=dot}}
|
spam · sausage · egg · beans · Lobster Thermidor · bacon | beans · spam · sausage · bacon · Lobster Thermidor · egg |
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=pipe}}
|
spam | Lobster Thermidor | bacon | egg | beans | Lobster Thermidor | spam | bacon | sausage | beans |
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=comma}}
|
beans, bacon, egg, sausage, Lobster Thermidor, spam | spam, sausage, beans, egg, bacon, Lobster Thermidor |
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=tpt-languages}}
|
Lobster Thermidor⧼tpt-languages-separator⧽egg⧼tpt-languages-separator⧽sausage⧼tpt-languages-separator⧽spam⧼tpt-languages-separator⧽beans⧼tpt-languages-separator⧽bacon | spam⧼tpt-languages-separator⧽bacon⧼tpt-languages-separator⧽egg⧼tpt-languages-separator⧽sausage⧼tpt-languages-separator⧽Lobster Thermidor⧼tpt-languages-separator⧽beans |
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=space}}
|
egg spam beans Lobster Thermidor bacon sausage | Lobster Thermidor spam bacon egg sausage beans |
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=...}}
|
sausage...spam...beans...bacon...egg...Lobster Thermidor | egg...beans...Lobster Thermidor...spam...sausage...bacon |
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|limit=4}}
|
beansbaconeggLobster Thermidor | Lobster Thermidorbaconbeanssausage |
Text list
[edit]Code | Main | Sandbox |
---|---|---|
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
|
bacon, beans, spam, Lobster Thermidor, sausage and egg | beans, Lobster Thermidor, sausage, bacon, spam and egg |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
|
Lobster Thermidor, egg, beans, sausage, bacon and spam | egg, bacon, Lobster Thermidor, beans, spam and sausage |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=dot}}
|
spam · beans · egg · sausage · Lobster Thermidor and bacon | Lobster Thermidor · sausage · spam · bacon · egg and beans |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=pipe}}
|
sausage | beans | bacon | spam and Lobster Thermidor | spam | sausage | bacon | egg and Lobster Thermidor |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=comma}}
|
bacon, egg, Lobster Thermidor, sausage, beans and spam | egg, beans, Lobster Thermidor, bacon, spam and sausage |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=tpt-languages}}
|
sausage⧼tpt-languages-separator⧽Lobster Thermidor⧼tpt-languages-separator⧽spam⧼tpt-languages-separator⧽bacon⧼tpt-languages-separator⧽beans and egg | sausage⧼tpt-languages-separator⧽Lobster Thermidor⧼tpt-languages-separator⧽egg⧼tpt-languages-separator⧽beans⧼tpt-languages-separator⧽spam and bacon |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=space}}
|
bacon spam egg beans sausage and Lobster Thermidor | egg Lobster Thermidor bacon beans sausage and spam |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=...}}
|
Lobster Thermidor...beans...bacon...sausage...spam and egg | spam...beans...egg...sausage...bacon and Lobster Thermidor |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=space|conj=...}}
|
Lobster Thermidor egg beans sausage bacon...spam | beans bacon spam Lobster Thermidor sausage...egg |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|conj=... and }}
|
Lobster Thermidor, spam, egg, bacon, sausage... and beans | sausage, bacon, beans, Lobster Thermidor, spam... and egg |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|limit=4}}
|
egg, beans, sausage and spam | sausage, egg, spam 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. |