From 7cd08ce375e462b853a2521f31d5040235558896 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 21 May 2021 20:42:13 +0100 Subject: [PATCH] apitest: Use new OtterArgsSpec in a few places Signed-off-by: Ian Jackson --- apitest/at-otter.rs | 15 ++++++--------- apitest/main.rs | 5 ++--- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/apitest/at-otter.rs b/apitest/at-otter.rs index d86d2540..955e9322 100644 --- a/apitest/at-otter.rs +++ b/apitest/at-otter.rs @@ -11,19 +11,17 @@ impl Ctx { fn library_load(&mut self) { self.prepare_game()?; - let command = self.ds().gss( - "library-list chess-yellow-?" - )?; - let output: String = self.otter(&command)?.into(); + let output: String = self.otter( + &G("library-list chess-yellow-?") + )?.into(); assert!( Regex::new("(?m)^wikimedia *chess-yellow-K *the yellow king$")? .find(&output) .is_some(), "got: {}", &output); - let command = self.ds().gss( - "library-add --lib wikimedia chess-blue-?" + let added = self.some_library_add( + &G("library-add --lib wikimedia chess-blue-?") )?; - let added = self.some_library_add(&command)?; assert_eq!(added.len(), 6); } @@ -145,8 +143,7 @@ impl Ctx { assert_eq!(b_pieces[b_pawns[1]].pos, a_pieces[a_pawns[0]].pos); - let command = self.ds().gss("reset demo")?; - self.otter_resetting(&command)?; + self.otter_resetting(&G("reset demo"))?; } #[throws(Explode)] diff --git a/apitest/main.rs b/apitest/main.rs index 38d4035b..647499c6 100644 --- a/apitest/main.rs +++ b/apitest/main.rs @@ -627,9 +627,8 @@ impl UsualCtx { #[throws(Explode)] pub fn clear_reset_to_demo(&mut self) { - let ds = self.su().ds.clone(); - self.otter_resetting(&ds.gss("clear-game")?)?; - self.otter_resetting(&ds.gss("reset demo")?)?; + self.otter_resetting(&G("clear-game"))?; + self.otter_resetting(&G("reset demo"))?; } } -- 2.30.2