From 5b03d1e2c8ba097b7585ec4a14e63b141855ac19 Mon Sep 17 00:00:00 2001 From: RumovZ Date: Fri, 15 Jan 2021 10:57:55 +0100 Subject: [PATCH] Add resched error tests --- rslib/src/search/parser.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rslib/src/search/parser.rs b/rslib/src/search/parser.rs index 4c26432e1..27f7cad34 100644 --- a/rslib/src/search/parser.rs +++ b/rslib/src/search/parser.rs @@ -877,6 +877,11 @@ mod test { assert_err_kind("rated:3:1.1", InvalidRatedEase("3".to_string())); assert_err_kind("rated:0:foo", InvalidRatedEase("1".to_string())); + assert_err_kind("resched:", FailKind::InvalidResched); + assert_err_kind("resched:-1", FailKind::InvalidResched); + assert_err_kind("resched:1:1", FailKind::InvalidResched); + assert_err_kind("resched:foo", FailKind::InvalidResched); + assert_err_kind("dupe:", InvalidDupeMid); assert_err_kind("dupe:1.1", InvalidDupeMid); assert_err_kind("dupe:foo", InvalidDupeMid);