diff --git a/builtin/builtin_test.go b/builtin/builtin_test.go index fcc0a5e1..9f5e1924 100644 --- a/builtin/builtin_test.go +++ b/builtin/builtin_test.go @@ -283,6 +283,7 @@ func TestBuiltin_errors(t *testing.T) { {`timezone(nil)`, "cannot use nil as argument (type string) to call timezone (1:10)"}, {`flatten([1, 2], [3, 4])`, "invalid number of arguments (expected 1, got 2)"}, {`flatten(1)`, "cannot flatten int"}, + {`fromJSON("5e2482")`, "cannot unmarshal number"}, } for _, test := range errorTests { t.Run(test.input, func(t *testing.T) { diff --git a/test/fuzz/fuzz_corpus.txt b/test/fuzz/fuzz_corpus.txt index 72afdf6c..4ce90e7b 100644 --- a/test/fuzz/fuzz_corpus.txt +++ b/test/fuzz/fuzz_corpus.txt @@ -19543,3 +19543,4 @@ values({"foo": ok}) {"foo": score, "foo": array}.array {"foo": score, "foo": f32} {"foo": score, "foo": greet} +fromJSON('5e2482') diff --git a/test/fuzz/fuzz_test.go b/test/fuzz/fuzz_test.go index 32c43de9..78661218 100644 --- a/test/fuzz/fuzz_test.go +++ b/test/fuzz/fuzz_test.go @@ -36,6 +36,7 @@ func FuzzExpr(f *testing.F) { regexp.MustCompile(`unknown time zone`), regexp.MustCompile(`invalid location name`), regexp.MustCompile(`json: unsupported value`), + regexp.MustCompile(`json: cannot unmarshal .* into Go value of type .*`), regexp.MustCompile(`unexpected end of JSON input`), regexp.MustCompile(`memory budget exceeded`), regexp.MustCompile(`using interface \{} as type .*`),