| 1 | | use PennMUSH; |
|---|
| 2 | | use MUSHConnection; |
|---|
| 3 | | use TestHarness; |
|---|
| 4 | | |
|---|
| 5 | | $mush = PennMUSH->new(); |
|---|
| 6 | | $god = $mush->loginGod(); |
|---|
| 7 | | |
|---|
| 8 | | test('decompose.1', $god, 'think decompose([ansi(hr,b[ansi(f,la)]h)])', '\[ansi\(hr,b\[ansi\(f,la\)\]\)\]\[ansi\(hr,h\)\]'); |
|---|
| 9 | | test('decompose.2', $god, 'think decompose(a\ \ \ \ b)', 'a %b %bb'); |
|---|
| 10 | | test('decompose.3', $god, 'think decompose(s(tab%treturn%r))', 'tab%treturn%r'); |
|---|
| 11 | | test('decompose.4', $god, 'think decompose(before(ansi(h,x),x)hello)', '\[ansi\(h,hello\)\]'); |
|---|
| 12 | | test('decompose.5', $god, 'think decompose([before(ansi(h,blah),\[)])', '!.'); |
|---|
| | 1 | login mortal |
|---|
| | 2 | run test: |
|---|
| | 3 | test('decompose.1', $mortal, 'think decompose([ansi(hr,b[ansi(f,la)]h)])', '\[ansi\(hr,b(\)\])?\[ansi\((?(1)fhr|f),la\)\](?(1)\[ansi\(hr,h|h)\)\]'); |
|---|
| | 4 | test('decompose.2', $mortal, 'think decompose(a\ \ \ \ b)', 'a %b %bb'); |
|---|
| | 5 | test('decompose.3', $mortal, 'think decompose(s(tab%treturn%r))', 'tab%treturn%r'); |
|---|
| | 6 | test('decompose.4', $mortal, 'think decompose(before(ansi(h,x),x)hello)', 'hello'); |
|---|
| | 7 | test('decompose.5', $mortal, 'think decompose([before(ansi(h,blah),\[)])', '\[ansi\(h,blah\)\]'); |
|---|