diff --git a/testdata/builtinManifestJsonEx.golden b/testdata/builtinManifestJsonEx.golden index 58fa830..bfb0ea7 100644 --- a/testdata/builtinManifestJsonEx.golden +++ b/testdata/builtinManifestJsonEx.golden @@ -1,4 +1,8 @@ { - "a": "{\n \"bam\": true,\n \"bar\": \"bar\",\n \"baz\": 1,\n \"bazel\": 1.42,\n \"bim\": false,\n \"blamo\": {\n \"cereal\": [\n \"<>& fizbuzz\"\n ],\n \"treats\": [\n {\n \"name\": \"chocolate\"\n }\n ]\n },\n \"boom\": -1,\n \"foo\": \"bar\"\n}", - "b": "[\n \"bar\",\n \"bar\",\n 1,\n 1.42,\n -1,\n false,\n true,\n {\n \"cereal\": [\n \"<>& fizbuzz\"\n ],\n \"treats\": [\n {\n \"name\": \"chocolate\"\n }\n ]\n }\n]" + "array": "[\n \"bar\",\n \"bar\",\n 1,\n 1.42,\n -1,\n false,\n true,\n {\n \"cereal\": [\n \"<>& fizbuzz\"\n ],\n \"treats\": [\n {\n \"name\": \"chocolate\"\n }\n ]\n }\n]", + "bool": "true", + "null": "null", + "number": "42", + "object": "{\n \"bam\": true,\n \"bar\": \"bar\",\n \"baz\": 1,\n \"bazel\": 1.42,\n \"bim\": false,\n \"blamo\": {\n \"cereal\": [\n \"<>& fizbuzz\"\n ],\n \"treats\": [\n {\n \"name\": \"chocolate\"\n }\n ]\n },\n \"boom\": -1,\n \"foo\": \"bar\"\n}", + "string": "\"foo\"" } diff --git a/testdata/builtinManifestJsonEx.jsonnet b/testdata/builtinManifestJsonEx.jsonnet index 4d6cf99..584c851 100644 --- a/testdata/builtinManifestJsonEx.jsonnet +++ b/testdata/builtinManifestJsonEx.jsonnet @@ -1,4 +1,4 @@ -local a = { +local object = { foo: 'bar', bar: self.foo, baz: 1, @@ -19,9 +19,9 @@ local a = { }, }; -local b = [ +local array = [ 'bar', - a.foo, + object.foo, 1, 1.42, -1, @@ -41,6 +41,10 @@ local b = [ ]; { - a: std.manifestJsonEx(a, ' '), - b: std.manifestJsonEx(b, ' '), + array: std.manifestJsonEx(array, ' '), + bool: std.manifestJsonEx(true, ' '), + 'null': std.manifestJsonEx(null, ' '), + object: std.manifestJsonEx(object, ' '), + number: std.manifestJsonEx(42, ' '), + string: std.manifestJsonEx('foo', ' '), }