Module:Random/testcases
From The Right Wiki
Jump to navigationJump to search
File:Gnome-applications-science.svg | 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
Code | Main | Sandbox |
---|---|---|
{{#invoke:random|number}}
|
0.0028037987662497 | 0.9675344400888 |
{{#invoke:random|number|10}}
|
4 | 5 |
{{#invoke:random|number|10|20}}
|
14 | 20 |
{{#invoke:random|number|500000}}
|
286993 | 8287 |
{{#invoke:random|number|-10}}
|
-6 | -1 |
{{#invoke:random|number|20|10}}
|
16 | 15 |
{{#invoke:random|number|-100|-50}}
|
-74 | -51 |
{{#invoke:random|number|6.5}}
|
3 | 6 |
{{#invoke:random|number|-6.5}}
|
-2 | -5 |
{{#invoke:random|number|-16.5|-6.5}}
|
-12.5 | -6.5 |
- Test randomness with the same input
Code | Main | Sandbox |
---|---|---|
{{#invoke:random|number}}
|
0.69380504670264 | 0.09467963552786 |
{{#invoke:random|number}}
|
0.48995027527676 | 0.78864371999569 |
{{#invoke:random|number}}
|
0.58402956444026 | 0.79033947912526 |
{{#invoke:random|number}}
|
0.58929881853484 | 0.38900313637639 |
{{#invoke:random|number}}
|
0.59140094909417 | 0.38778393547413 |
{{#invoke:random|number}}
|
0.68628742903764 | 0.25936929008894 |
{{#invoke:random|number}}
|
0.12881393410676 | 0.80576142613113 |
{{#invoke:random|number}}
|
0.08525135511777 | 0.44631316393908 |
{{#invoke:random|number}}
|
0.24713330308308 | 0.54149075902137 |
{{#invoke:random|number}}
|
0.34037501473929 | 0.63737865706784 |
{{#invoke:random|number|1000}}
|
899 | 381 |
{{#invoke:random|number|1000}}
|
824 | 276 |
{{#invoke:random|number|1000}}
|
239 | 731 |
{{#invoke:random|number|1000}}
|
699 | 695 |
{{#invoke:random|number|1000}}
|
476 | 950 |
{{#invoke:random|number|1000}}
|
905 | 915 |
{{#invoke:random|number|1000}}
|
898 | 339 |
{{#invoke:random|number|1000}}
|
890 | 253 |
{{#invoke:random|number|1000}}
|
701 | 165 |
{{#invoke:random|number|1000}}
|
160 | 659 |
Same number
Code | Main | Sandbox |
---|---|---|
{{#invoke:random|number|same=yes}}
|
0.84584664685924 | 0.84584664685924 |
{{#invoke:random|number|same=yes|10}}
|
1 | 1 |
{{#invoke:random|number|same=yes|10|20}}
|
10 | 10 |
{{#invoke:random|number|same=yes|500000}}
|
23789 | 23789 |
{{#invoke:random|number|same=yes|-10}}
|
0 | 0 |
{{#invoke:random|number|same=yes|20|10}}
|
10 | 10 |
{{#invoke:random|number|same=yes|-100|-50}}
|
-98 | -98 |
{{#invoke:random|number|same=yes|6.5}}
|
1 | 1 |
{{#invoke:random|number|same=yes|-6.5}}
|
0 | 0 |
{{#invoke:random|number|same=yes|-16.5|-6.5}}
|
-16.5 | -16.5 |
- Test randomness with the same input
Code | Main | Sandbox |
---|---|---|
{{#invoke:random|number|same=yes}}
|
0.84584664685924 | 0.84584664685924 |
{{#invoke:random|number|same=yes}}
|
0.84584664685924 | 0.84584664685924 |
{{#invoke:random|number|same=yes}}
|
0.84584664685924 | 0.84584664685924 |
{{#invoke:random|number|same=yes}}
|
0.84584664685924 | 0.84584664685924 |
{{#invoke:random|number|same=yes}}
|
0.84584664685924 | 0.84584664685924 |
{{#invoke:random|number|same=yes}}
|
0.84584664685924 | 0.84584664685924 |
{{#invoke:random|number|same=yes}}
|
0.84584664685924 | 0.84584664685924 |
{{#invoke:random|number|same=yes}}
|
0.84584664685924 | 0.84584664685924 |
{{#invoke:random|number|same=yes}}
|
0.84584664685924 | 0.84584664685924 |
{{#invoke:random|number|same=yes}}
|
0.84584664685924 | 0.84584664685924 |
{{#invoke:random|number|same=yes|1000}}
|
48 | 48 |
{{#invoke:random|number|same=yes|1000}}
|
48 | 48 |
{{#invoke:random|number|same=yes|1000}}
|
48 | 48 |
{{#invoke:random|number|same=yes|1000}}
|
48 | 48 |
{{#invoke:random|number|same=yes|1000}}
|
48 | 48 |
{{#invoke:random|number|same=yes|1000}}
|
48 | 48 |
{{#invoke:random|number|same=yes|1000}}
|
48 | 48 |
{{#invoke:random|number|same=yes|1000}}
|
48 | 48 |
{{#invoke:random|number|same=yes|1000}}
|
48 | 48 |
{{#invoke:random|number|same=yes|1000}}
|
48 | 48 |
Date
Code | Main | Sandbox |
---|---|---|
{{#invoke:random|date}}
|
14:54, 15 August 2025 (UTC) | 23:52, 13 October 2025 (UTC) |
{{#invoke:random|date|1 Jan 2000}}
|
01:51, 14 March 1997 (UTC) | 23:33, 04 February 1999 (UTC) |
{{#invoke:random|date|1 Jan 2000|27 July 2176}}
|
00:23, 07 February 2174 (UTC) | 20:09, 24 October 2000 (UTC) |
{{#invoke:random|date|1000|2000|format=Y}}
|
1106 | 1176 |
{{#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}}
|
2025/02/12 14:55 | 2025/09/21 10:23 |
Item
Code | Main | Sandbox |
---|---|---|
{{#invoke:random|item|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
|
bacon | spam |
{{#invoke:random|item|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
|
bacon | bacon |
List
Code | Main | Sandbox |
---|---|---|
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
|
eggsausagebeansbaconLobster Thermidorspam | Lobster Thermidorbaconeggspamsausagebeans |
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
|
eggspambeansbaconsausageLobster Thermidor | baconbeanseggspamsausageLobster Thermidor |
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=dot}}
|
egg⧼dot-separator⧽spam⧼dot-separator⧽beans⧼dot-separator⧽sausage⧼dot-separator⧽Lobster Thermidor⧼dot-separator⧽bacon | spam⧼dot-separator⧽egg⧼dot-separator⧽Lobster Thermidor⧼dot-separator⧽beans⧼dot-separator⧽sausage⧼dot-separator⧽bacon |
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=pipe}}
|
beans | spam | egg | Lobster Thermidor | sausage | spam | bacon | egg | Lobster Thermidor | beans |
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=comma}}
|
beans, sausage, spam, bacon, egg, Lobster Thermidor | beans, bacon, egg, Lobster Thermidor, sausage, spam |
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=tpt-languages}}
|
spam⧼tpt-languages-separator⧽bacon⧼tpt-languages-separator⧽sausage⧼tpt-languages-separator⧽egg⧼tpt-languages-separator⧽Lobster Thermidor⧼tpt-languages-separator⧽beans | sausage⧼tpt-languages-separator⧽spam⧼tpt-languages-separator⧽bacon⧼tpt-languages-separator⧽beans⧼tpt-languages-separator⧽egg⧼tpt-languages-separator⧽Lobster Thermidor |
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=space}}
|
bacon egg beans spam sausage Lobster Thermidor | sausage bacon egg spam beans Lobster Thermidor |
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=...}}
|
Lobster Thermidor...sausage...egg...spam...beans...bacon | beans...sausage...Lobster Thermidor...spam...egg...bacon |
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|limit=4}}
|
baconspambeanssausage | baconsausageeggbeans |
Text list
Code | Main | Sandbox |
---|---|---|
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
|
spam, bacon, egg, sausage, Lobster Thermidor and beans | egg, Lobster Thermidor, spam, beans, bacon and sausage |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
|
sausage, spam, Lobster Thermidor, beans, bacon and egg | beans, Lobster Thermidor, sausage, bacon, spam and egg |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=dot}}
|
sausage⧼dot-separator⧽egg⧼dot-separator⧽Lobster Thermidor⧼dot-separator⧽beans⧼dot-separator⧽spam and bacon | bacon⧼dot-separator⧽beans⧼dot-separator⧽sausage⧼dot-separator⧽Lobster Thermidor⧼dot-separator⧽spam and egg |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=pipe}}
|
bacon | egg | Lobster Thermidor | beans and spam | egg | sausage | spam | beans and bacon |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=comma}}
|
Lobster Thermidor, sausage, egg, spam, beans and bacon | beans, bacon, spam, sausage, egg and Lobster Thermidor |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=tpt-languages}}
|
beans⧼tpt-languages-separator⧽spam⧼tpt-languages-separator⧽Lobster Thermidor⧼tpt-languages-separator⧽bacon⧼tpt-languages-separator⧽egg and sausage | beans⧼tpt-languages-separator⧽Lobster Thermidor⧼tpt-languages-separator⧽sausage⧼tpt-languages-separator⧽bacon⧼tpt-languages-separator⧽egg and spam |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=space}}
|
sausage beans spam bacon egg and Lobster Thermidor | Lobster Thermidor beans spam bacon egg and sausage |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=...}}
|
Lobster Thermidor...bacon...spam...egg...beans and sausage | beans...spam...egg...bacon...Lobster Thermidor and sausage |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=space|conj=...}}
|
bacon egg spam beans sausage...Lobster Thermidor | egg beans spam bacon Lobster Thermidor...sausage |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|conj=... and }}
|
egg, bacon, beans, Lobster Thermidor, sausage... and spam | egg, sausage, bacon, beans, Lobster Thermidor... and spam |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|limit=4}}
|
bacon, Lobster Thermidor, sausage and beans | beans, bacon, egg and Lobster Thermidor |
Bulleted list
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
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
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
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
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
Code | Main | Sandbox |
---|---|---|
{{#invoke:random|link|Aristotle}}
|
Script error: The function "link" does not exist. | Script error: The function "link" does not exist. |