Skip to content

Commit

Permalink
test: add test case for invalid jq arg
Browse files Browse the repository at this point in the history
  • Loading branch information
w-lfchen committed Sep 17, 2024
1 parent 2dae242 commit f4d9e80
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crates/simplexpr/src/eval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,7 @@ mod tests {
jq_basic_index(r#"jq("[7,8,9]", ".[0]")"#) => Ok(DynVal::from(7)),
jq_raw_arg(r#"jq("[ \"foo\" ]", ".[0]", "r")"#) => Ok(DynVal::from("foo")),
jq_empty_arg(r#"jq("[ \"foo\" ]", ".[0]", "")"#) => Ok(DynVal::from(r#""foo""#)),
jq_invalid_arg(r#"jq("[ \"foo\" ]", ".[0]", "hello")"#) => Ok(DynVal::from(r#""foo""#)),
jq_no_arg(r#"jq("[ \"foo\" ]", ".[0]")"#) => Ok(DynVal::from(r#""foo""#)),
}
}

0 comments on commit f4d9e80

Please sign in to comment.