| 1 | | use PennMUSH; |
|---|
| 2 | | use MUSHConnection; |
|---|
| 3 | | use TestHarness; |
|---|
| 4 | | |
|---|
| 5 | | $mush = PennMUSH->new(); |
|---|
| 6 | | $god = $mush->loginGod(); |
|---|
| 7 | | |
|---|
| 8 | | test('stringsecs.1', $god, 'think stringsecs(a)', '#-1 INVALID TIMESTRING'); |
|---|
| 9 | | test('stringsecs.2', $god, 'think stringsecs(10)', '10'); |
|---|
| 10 | | test('stringsecs.3', $god, 'think stringsecs(10s)', '10'); |
|---|
| 11 | | test('stringsecs.4', $god, 'think stringsecs(5m)', '300'); |
|---|
| 12 | | test('stringsecs.5', $god, 'think stringsecs(5m 10s)', '310'); |
|---|
| 13 | | test('stringsecs.6', $god, 'think stringsecs(1h)', '3600'); |
|---|
| 14 | | test('stringsecs.7', $god, 'think stringsecs(10s 5m)', '310'); |
|---|
| 15 | | test('stringsecs.8', $god, 'think stringsecs(1d 2h 3m 4s)', '93784'); |
|---|
| 16 | | test('stringsecs.9', $god, 'think stringsecs(h)', '#-1 INVALID TIMESTRING'); |
|---|
| | 1 | login mortal |
|---|
| | 2 | run tests: |
|---|
| | 3 | test('stringsecs.1', $mortal, 'think stringsecs(a)', '#-1 INVALID TIMESTRING'); |
|---|
| | 4 | test('stringsecs.2', $mortal, 'think stringsecs(10)', '10'); |
|---|
| | 5 | test('stringsecs.3', $mortal, 'think stringsecs(10s)', '10'); |
|---|
| | 6 | test('stringsecs.4', $mortal, 'think stringsecs(5m)', '300'); |
|---|
| | 7 | test('stringsecs.5', $mortal, 'think stringsecs(5m 10s)', '310'); |
|---|
| | 8 | test('stringsecs.6', $mortal, 'think stringsecs(1h)', '3600'); |
|---|
| | 9 | test('stringsecs.7', $mortal, 'think stringsecs(10s 5m)', '310'); |
|---|
| | 10 | test('stringsecs.8', $mortal, 'think stringsecs(1d 2h 3m 4s)', '93784'); |
|---|
| | 11 | test('stringsecs.9', $mortal |
|---|
| | 12 | , 'think stringsecs(h)', '#-1 INVALID TIMESTRING'); |
|---|