From f4d9e80645723e56e1d1c89f917d9ada9f1dc1e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?W=C3=B6lfchen?= <115360611+W-lfchen@users.noreply.github.com> Date: Tue, 17 Sep 2024 16:30:24 +0200 Subject: [PATCH] test: add test case for invalid jq arg --- crates/simplexpr/src/eval.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/simplexpr/src/eval.rs b/crates/simplexpr/src/eval.rs index 8412ee7f..ede42d7d 100644 --- a/crates/simplexpr/src/eval.rs +++ b/crates/simplexpr/src/eval.rs @@ -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""#)), } }