feat: add testdata coverage for minArray/maxArray onEmpty error

This commit is contained in:
John Bartholomew 2025-03-11 00:40:53 +00:00
parent 9a89560b0d
commit 52bb10f003
12 changed files with 26 additions and 0 deletions

10
testdata/std.maxArrayOnEmpty.golden vendored Normal file
View File

@ -0,0 +1,10 @@
RUNTIME ERROR: Expected at least one element in array. Got none
-------------------------------------------------
testdata/std.maxArrayOnEmpty:1:1-17 $
std.maxArray([])
-------------------------------------------------
During evaluation

1
testdata/std.maxArrayOnEmpty.jsonnet vendored Normal file
View File

@ -0,0 +1 @@
std.maxArray([])

View File

1
testdata/std.maxArrayOnEmpty2.golden vendored Normal file
View File

@ -0,0 +1 @@
42

1
testdata/std.maxArrayOnEmpty2.jsonnet vendored Normal file
View File

@ -0,0 +1 @@
std.maxArray([], onEmpty=42)

View File

10
testdata/std.minArrayOnEmpty.golden vendored Normal file
View File

@ -0,0 +1,10 @@
RUNTIME ERROR: Expected at least one element in array. Got none
-------------------------------------------------
testdata/std.minArrayOnEmpty:1:1-17 $
std.minArray([])
-------------------------------------------------
During evaluation

1
testdata/std.minArrayOnEmpty.jsonnet vendored Normal file
View File

@ -0,0 +1 @@
std.minArray([])

View File

1
testdata/std.minArrayOnEmpty2.golden vendored Normal file
View File

@ -0,0 +1 @@
99

1
testdata/std.minArrayOnEmpty2.jsonnet vendored Normal file
View File

@ -0,0 +1 @@
std.minArray([], onEmpty=99)

View File