Skip to content

Commit 1f5ec05

Browse files
add regression test case for #385
1 parent 15d4911 commit 1f5ec05

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test_suite/stdlib.jsonnet

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ std.assertEqual(
6767
std.makeArray(10, function(n) std.sqrt(n))
6868
) &&
6969

70+
// Regression test for https://github.com/google/jsonnet/issues/385
71+
std.assertEqual(std.makeArray(sz=3, func=function(i) i), [0, 1, 2]) &&
72+
std.assertEqual(std.pow(x=3, n=2), 9) &&
73+
std.assertEqual(std.pow(n=2, x=3), 9) &&
74+
7075
std.assertEqual(std.pow(3, 2), 9) &&
7176
std.assertEqual(std.floor(10), 10) &&
7277
std.assertEqual(std.floor(10.99999), 10) &&

0 commit comments

Comments
 (0)