From dc12324c9b2756555fbd305782e9024a067409c2 Mon Sep 17 00:00:00 2001 From: lifegpc Date: Tue, 21 Jun 2022 06:03:18 +0000 Subject: [PATCH] Add more test case in test_author_name_filter --- src/opt/author_name_filter.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/opt/author_name_filter.rs b/src/opt/author_name_filter.rs index 8474edf..df5292e 100644 --- a/src/opt/author_name_filter.rs +++ b/src/opt/author_name_filter.rs @@ -172,4 +172,9 @@ fn test_author_name_filter() { ); assert_eq!(l.filter("sss@ss@お仕事募集中"), "sss@ss"); assert_eq!(l.filter("sss🌸ss🌸お仕事募集中"), "sss🌸ss"); + let l = AuthorNameFilter::from_json( + json::array![{"type": "regex", "rule": "(?<=^桃豆こまもち).*"}], + ) + .unwrap(); + assert_eq!(l.filter("桃豆こまもち🍡日曜西ま11a"), "桃豆こまもち"); }