aorecomp

Anarchy Online classic in the browser

git clone https://aorecomp.ubeagle.com/code/aorecomp.git


commit 8a6512c8fb0ec6a0ac281a107603b9b8567a742e
parent 5e78d9d57b72745ddf0774ec9064a29003e48f80
Author: anon <anon@example.com>
Date:   Sat,  7 Nov 2026 03:30:25 +0000

Verify deferred Arrival Hall refusals through the chat owner

Diffstat:
Mserver/arrival_hall_test.go | 9++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/server/arrival_hall_test.go b/server/arrival_hall_test.go @@ -285,7 +285,14 @@ func TestArrivalHallCorridorInventoryRefusalIsNotRepeatedEveryTick(t *testing.T) world.advanceZoneCrossings(time.Now()) world.advanceZoneCrossings(time.Now()) - if !reflect.DeepEqual(player.record(), before) || !reflect.DeepEqual(world.items, items) || len(world.clients[1].doorMessages) != 1 { + // The chat owner retains the refusal until the separate connection arrives. + output := &combatTestConn{} + setChatClients(t, world, map[uint32]*chatClient{1: {id: 1, conn: output}}) + defer setChatClients(t, world, nil) + world.advanceZoneCrossings(time.Now()) + readChatState(t, world) + want := chatPacket(36, appendChatString(nil, "Make room in your inventory for your starting map and equipment, then try leaving again.")) + if !reflect.DeepEqual(player.record(), before) || !reflect.DeepEqual(world.items, items) || !reflect.DeepEqual(output.packets, [][]byte{want}) { t.Fatal("inventory refusal changed state or repeated without leaving the exit") } }