From 4fbc4cfe18ac7940d760fe2ff6ede97da4b9e22c Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 22 Feb 2021 00:41:06 +0000 Subject: [PATCH] tests: wip library-load Signed-off-by: Ian Jackson --- apitest/at-otter.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/apitest/at-otter.rs b/apitest/at-otter.rs index 8f61a74c..f8e229a2 100644 --- a/apitest/at-otter.rs +++ b/apitest/at-otter.rs @@ -16,8 +16,19 @@ deref_to_field!{Ctx, SetupCore, su} impl Ctx { #[throws(AE)] - fn library_load(&self) { + pub fn otter>(&mut self, args: &[S]) { + let args: Vec = + ["--account", "server:"].iter().cloned().map(Into::into) + .chain(args.iter().map(|s| s.as_ref().to_owned())) + .collect(); + self.ds.otter(&args)?; + } + + #[throws(AE)] + fn library_load(&mut self) { prepare_game(&self.ds, TABLE)?; + + self.otter(&self.ds.ss("library-add @table@ wikimedia chess-blue-?")?)?; } } -- 2.30.2