chiark / gitweb /
at-currency: Add spaces in desc patterns
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 1 May 2022 19:49:35 +0000 (20:49 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 1 May 2022 20:04:15 +0000 (21:04 +0100)
We don't want to match numbers which happen to end with our pattern!

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
apitest/at-currency.rs

index 8811c216959f700b13ceb019fd96f4bba2781feb..d68756955c21572cb753a0c5163a24f7b0f146dd 100644 (file)
@@ -21,8 +21,8 @@ impl Ctx {
     ))?;
     alice.synchu(&mut a_pieces)?;
 
-    a_pieces[bn1].assert_desc_contains("50ƒ");
-    let _change = a_pieces.find_by_desc_glob("*350ƒ*");
+    a_pieces[bn1].assert_desc_contains(" 50ƒ");
+    let _change = a_pieces.find_by_desc_glob("* 350ƒ*");
 
     alice.api_piece(GH::Ungrab, PuSynch((&mut a_pieces, bn1)), other_pile)?;
     alice.synchu(&mut a_pieces)?;