// Tests specific for endless lobby or endless lobby interaction mod common; #[test] fn join_endless() { let mut client = common::setup(); client.send(1, ".n 1"); client.send(1, ".j 0"); client.read_all(); assert!(client.last(1).contains("Welcome to the 『Endless Lobby』, big doggo. You lucky, family, you are THRUSTEE!!!!.. . Choose now... .
your THRUSTEE Choices:")); } #[test] fn play_endless() { let mut client = common::setup(); client.send(1, ".n 1"); client.send(1, ".p"); client.read_all(); assert!(client.last(1).contains("Welcome to the 『Endless Lobby』, big doggo. You lucky, family, you are THRUSTEE!!!!.. . Choose now... .
your THRUSTEE Choices:")); } #[test] fn endless_configurations() { let mut client = common::setup(); client.send(1, ".n 1"); client.send(1, ".p"); client.send(1, ".i"); client.read_all(); assert_eq!(client.last(1), "\\\\Lobby info//
ID: 0
Chief: EndlessLobbyHostDoggo
Players: 1/18446744073709551615
Max points? 255
House THRUSTS? 18446744073709551615
THRUSTEES? 3
THRUSTERS? 5"); } // Bug: Panic occurrs when trying to join endless after leaving // Reason: THRUSTEE was not being reset properly when new lobby starts #[test] fn join_after_a_round_is_played() { let mut client = common::setup(); client.send(1, ".n 1"); client.send(1, ".p"); client.send(2, ".n 2"); client.send(2, ".p"); client.send(1, ".t 1"); client.thrust(2); client.send(1, ".t 1"); client.send(1, ".l"); client.send(2, ".l"); client.send(1, ".p"); client.send(2, ".p"); client.read_all(); assert_eq!( client.last(2), "Joined: 0
THRUSTEE 1 is currently CHOOSING next THRUSTEE. Hold on tight!" ); } // Bug: Panic occurs when trying to rejoin left endless lobby and choosing a THRUSTEE #[test] fn rejoin_after_choosing_thrustee() { let mut client = common::setup(); client.send(1, ".n 1"); client.send(1, ".p"); client.send(1, ".t 1"); client.send(1, ".l"); client.send(1, ".p"); client.read_all(); let msg = client.last(1); assert!(msg.contains("You lucky, family, you are THRUSTEE!!!!")); assert!(msg.contains("your THRUSTEE Choices:")); assert!(msg.contains("1. ")); assert!(msg.contains("2. ")); assert!(msg.contains("3. ")); }