Module:Random/testcases

From The Right Wiki
Jump to navigationJump to search

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}}
  • egg
  • bacon
  • beans
  • Lobster Thermidor
  • spam
  • sausage
  • sausage
  • spam
  • bacon
  • beans
  • egg
  • Lobster Thermidor
{{#invoke:random|bulleted_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|style=color: green}}
  • sausage
  • Lobster Thermidor
  • beans
  • egg
  • spam
  • bacon
  • spam
  • Lobster Thermidor
  • beans
  • egg
  • bacon
  • sausage
{{#invoke:random|bulleted_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|item2_style=color: green|item4_style=color: orange}}
  • beans
  • Lobster Thermidor
  • egg
  • spam
  • sausage
  • bacon
  • sausage
  • beans
  • egg
  • Lobster Thermidor
  • bacon
  • spam
{{#invoke:random|bulleted_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|limit=4}}
  • sausage
  • spam
  • Lobster Thermidor
  • egg
  • bacon
  • Lobster Thermidor
  • sausage
  • egg

Unbulleted list

Code Main Sandbox
{{#invoke:random|unbulleted_list|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
  • beans
  • sausage
  • spam
  • egg
  • Lobster Thermidor
  • bacon
  • bacon
  • beans
  • egg
  • spam
  • Lobster Thermidor
  • sausage
{{#invoke:random|unbulleted_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|style=color: green}}
  • Lobster Thermidor
  • sausage
  • spam
  • beans
  • bacon
  • egg
  • bacon
  • sausage
  • Lobster Thermidor
  • egg
  • spam
  • beans
{{#invoke:random|unbulleted_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|item2_style=color: green|item4_style=color: orange}}
  • bacon
  • egg
  • Lobster Thermidor
  • beans
  • sausage
  • spam
  • egg
  • beans
  • sausage
  • spam
  • bacon
  • Lobster Thermidor
{{#invoke:random|unbulleted_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|limit=4}}
  • Lobster Thermidor
  • sausage
  • bacon
  • egg
  • bacon
  • beans
  • spam
  • sausage

Horizontal list

Code Main Sandbox
{{#invoke:random|horizontal_list|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
  • beans
  • Lobster Thermidor
  • sausage
  • bacon
  • spam
  • egg
  • Lobster Thermidor
  • sausage
  • bacon
  • egg
  • beans
  • spam
{{#invoke:random|horizontal_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|style=color: green}}
  • spam
  • beans
  • egg
  • bacon
  • sausage
  • Lobster Thermidor
  • beans
  • Lobster Thermidor
  • sausage
  • egg
  • spam
  • bacon
{{#invoke:random|horizontal_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|item2_style=color: green|item4_style=color: orange}}
  • Lobster Thermidor
  • sausage
  • beans
  • spam
  • bacon
  • egg
  • egg
  • sausage
  • beans
  • Lobster Thermidor
  • bacon
  • spam
{{#invoke:random|horizontal_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|limit=4}}
  • Lobster Thermidor
  • beans
  • egg
  • bacon
  • egg
  • spam
  • Lobster Thermidor
  • bacon

Ordered list

Code Main Sandbox
{{#invoke:random|ordered_list|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
  1. Lobster Thermidor
  2. egg
  3. spam
  4. beans
  5. sausage
  6. bacon
  1. spam
  2. egg
  3. sausage
  4. bacon
  5. beans
  6. Lobster Thermidor
{{#invoke:random|ordered_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|style=color: green}}
  1. egg
  2. spam
  3. bacon
  4. beans
  5. sausage
  6. Lobster Thermidor
  1. egg
  2. spam
  3. bacon
  4. beans
  5. Lobster Thermidor
  6. sausage
{{#invoke:random|ordered_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|item2_style=color: green|item4_style=color: orange}}
  1. spam
  2. sausage
  3. Lobster Thermidor
  4. egg
  5. bacon
  6. beans
  1. egg
  2. spam
  3. Lobster Thermidor
  4. sausage
  5. bacon
  6. beans
{{#invoke:random|ordered_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|list_style_type=lower greek}}
  1. spam
  2. sausage
  3. beans
  4. bacon
  5. Lobster Thermidor
  6. egg
  1. sausage
  2. beans
  3. Lobster Thermidor
  4. egg
  5. spam
  6. bacon
{{#invoke:random|ordered_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|type=I}}
  1. sausage
  2. beans
  3. egg
  4. Lobster Thermidor
  5. bacon
  6. spam
  1. beans
  2. bacon
  3. spam
  4. Lobster Thermidor
  5. egg
  6. sausage
{{#invoke:random|ordered_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|limit=4}}
  1. bacon
  2. sausage
  3. beans
  4. egg
  1. beans
  2. egg
  3. Lobster Thermidor
  4. spam

Horizontal ordered list

Code Main Sandbox
{{#invoke:random|horizontal_ordered_list|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
  1. beans
  2. sausage
  3. bacon
  4. Lobster Thermidor
  5. egg
  6. spam
  1. bacon
  2. egg
  3. beans
  4. Lobster Thermidor
  5. spam
  6. sausage
{{#invoke:random|horizontal_ordered_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|style=color: green}}
  1. egg
  2. sausage
  3. bacon
  4. beans
  5. Lobster Thermidor
  6. spam
  1. spam
  2. sausage
  3. beans
  4. egg
  5. bacon
  6. Lobster Thermidor
{{#invoke:random|horizontal_ordered_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|item2_style=color: green|item4_style=color: orange}}
  1. bacon
  2. Lobster Thermidor
  3. egg
  4. sausage
  5. beans
  6. spam
  1. sausage
  2. spam
  3. egg
  4. bacon
  5. beans
  6. Lobster Thermidor
{{#invoke:random|horizontal_ordered_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|limit=4}}
  1. spam
  2. bacon
  3. Lobster Thermidor
  4. sausage
  1. sausage
  2. beans
  3. spam
  4. egg

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.