Skip to content

Commit

Permalink
add some case insensitive test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
groobyming committed May 20, 2024
1 parent dd2b673 commit 415568f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/parser/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2210,6 +2210,20 @@ mod tests {
.iter()
.for_each(|expr| assert_eq!(parser::parse(expr).unwrap().to_string(), *expr));

let or_insensitive_cases = vec![
r#"a{label1="1" or label2="2"}"#,
r#"a{label1="1" OR label2="2"}"#,
r#"a{label1="1" Or label2="2"}"#,
r#"a{label1="1" oR label2="2"}"#,
];

or_insensitive_cases.iter().for_each(|expr| {
assert_eq!(
parser::parse(expr).unwrap().to_string(),
r#"a{label1="1" or label2="2"}"#
)
});

let fail_cases = vec![
(
r#"foo{or}"#,
Expand Down

0 comments on commit 415568f

Please sign in to comment.