root/1.8.2/trunk/test/testrand.pl

Revision 441, 485 bytes (checked in by pennmush, 2 years ago)

PennMUSH 1.7.7p21 Archival

Line 
1use PennMUSH;
2use MUSHConnection;
3use TestHarness;
4
5$mush = PennMUSH->new();
6$god = $mush->loginGod();
7
8test('rand.1', $god, 'think rand(-1)', '#-1');
9test('rand.2', $god, 'think rand(0)', '#-1');
10test('rand.3', $god, 'think rand(1)', '0');
11test('rand.4', $god, 'think rand(10)', '^\d\s*$');
12test('rand.5', $god, 'think rand(0,0)', '0');
13test('rand.6', $god, 'think rand(1,1)', '1');
14test('rand.7', $god, 'think rand(2,1)', '#-1');
15test('rand.8', $god, 'think rand(0,9)', '^\d\s*$');
Note: See TracBrowser for help on using the browser.