chiark
/
gitweb
/
~ianmdlvl
/
otter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1b4c893
)
apitest: check_library_item: Check count of matches
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Mon, 17 May 2021 18:37:54 +0000
(19:37 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Mon, 17 May 2021 23:21:11 +0000
(
00:21
+0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
apitest/at-bundles.rs
patch
|
blob
|
history
diff --git
a/apitest/at-bundles.rs
b/apitest/at-bundles.rs
index 2990b4a179fb1da2625fd95ae60881592fad2db2..34c7059ddeddc82c8d0901c12be2b974f9f0fbd1 100644
(file)
--- a/
apitest/at-bundles.rs
+++ b/
apitest/at-bundles.rs
@@
-19,15
+19,15
@@
impl Ctx {
assert_eq!( added.len(), 1 );
let output: String = self.otter(&ds.ss("list-pieces @table@")?)?.into();
- assert!( Regex::new(
+ assert
_eq
!( Regex::new(
&format!(
r#"(?m)(?:[^\w-]|^){}[^\w-].*\W{}(?:\W|$)"#,
item, desc,
)
)?
- .find(&output)
-
.is_some()
,
- "got: {}", &output);
+ .find_iter(&output).count(),
+
1
,
+
"got: {}", &output);
}
#[throws(Explode)]