From: Ian Jackson Date: Sat, 15 May 2021 18:04:40 +0000 (+0100) Subject: apitest: Test library listing X-Git-Tag: otter-0.6.0~274 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=3413c1333d4ede918dbcb2e0a36fa9fa8d73fe05;p=otter.git apitest: Test library listing Signed-off-by: Ian Jackson --- diff --git a/apitest/at-otter.rs b/apitest/at-otter.rs index d42f47f5..1b5cf178 100644 --- a/apitest/at-otter.rs +++ b/apitest/at-otter.rs @@ -496,6 +496,15 @@ impl Ctx { fn library_load(&mut self) { prepare_game(&self.su().ds, &self.prctx, TABLE)?; + let command = self.su().ds.ss( + "library-list wikimedia chess-yellow-?" + )?; + let output: String = self.otter(&command)?.into(); + assert!( Regex::new("(?m)^chess-yellow-K *the yellow king$")? + .find(&output) + .is_some(), + "got: {}", &output); + let command = self.su().ds.ss( "library-add @table@ wikimedia chess-blue-?" )?;