From 2ef3823aad08aa2c6f812cc1bdb4815f3d383183 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 27 Feb 2021 00:28:48 +0000 Subject: [PATCH] apitest: rerun otter library-add Signed-off-by: Ian Jackson --- apitest/at-otter.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/apitest/at-otter.rs b/apitest/at-otter.rs index 98454cb0..201f87f3 100644 --- a/apitest/at-otter.rs +++ b/apitest/at-otter.rs @@ -270,9 +270,10 @@ impl Ctx { fn library_load(&mut self) { prepare_game(&self.ds, TABLE)?; - let add_err = self.otter(&self.ds.ss( + let command = self.ds.ss( "library-add @table@ wikimedia chess-blue-?" - )?) + )?; + let add_err = self.otter(&command) .expect_err("library-add succeeded after reset!"); ensure_eq!(add_err.downcast::()?.0.code(), Some(EXIT_NOTFOUND)); @@ -289,10 +290,14 @@ impl Ctx { for (llm, pos) in izip!(&llm, [PosC([5,5]), PosC([50,25])].iter()) { session.api_piece_op(&self.su, &llm.id, "grab", json!({}))?; session.api_piece_op(&self.su, &llm.id, "m", json![pos.0])?; + session.api_piece_op(&self.su, &llm.id, "ungrab", json!({}))?; } session.resynch_pieces()?; + self.otter(&command) + .expect("library-add failed after place!"); + // xxx send api requests to move markers // run library-add again } -- 2.30.2