jrsonnet
jrsonnet copied to clipboard
Error statement executes unexpectedly
From https://github.com/google/go-jsonnet/blob/master/testdata/std.filter7.jsonnet
std.filter(function(n) false, [error "xxx"])
➜ cjsonnet ./go-jsonnet-test/vendor/testdata/std.filter7.jsonnet
[ ]
➜ jsonnet ./go-jsonnet-test/vendor/testdata/std.filter7.jsonnet
[ ]
➜ jrsonnet ./go-jsonnet-test/vendor/testdata/std.filter7.jsonnet
runtime error: xxx
go-jsonnet-test/vendor/github.com/google/go-jsonnet/testdata/std.filter7.jsonnet:1:32-44: error statement
go-jsonnet-test/vendor/github.com/google/go-jsonnet/testdata/std.filter7.jsonnet:1:1-46: function <builtin_filter> call
I need to re-sync my standard tests status, or better yet, add them to automatic testing.
I have done it manually before, as the golden tests often didn't match jrsonnet output due to differences in manifestification/stack trace formats, but now I can just add tests from upstream to the list of jrsonnet own snapshot testing.
In this case, builtin_filter should be split to lazy-eager switch as I done for many other functions in #193