diff --git a/lib/src/sql/range.rs b/lib/src/sql/range.rs index 77c31825..32632d9a 100644 --- a/lib/src/sql/range.rs +++ b/lib/src/sql/range.rs @@ -34,11 +34,21 @@ pub fn range(i: &str) -> IResult<&str, Range> { }, )) } + #[cfg(test)] mod tests { use super::*; + #[test] + fn range_int() { + let sql = "person:1..100"; + let res = range(sql); + assert!(res.is_ok()); + let out = res.unwrap().1; + assert_eq!(r#"person:1..100"#, format!("{}", out)); + } + #[test] fn range_array() { let sql = "person:['USA', 10]..['USA', 100]";