Add test for range queries with integer record IDs
This commit is contained in:
parent
820b49c3d1
commit
0e2b134de2
1 changed files with 10 additions and 0 deletions
|
@ -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]";
|
||||
|
|
Loading…
Reference in a new issue