Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sjsonnet/src/sjsonnet/YamlRenderer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class YamlRenderer(
null,
YamlRenderer.this.elemBuilder,
s,
escapeUnicode = true,
escapeUnicode = false,
wrapQuotes = true
)
} else {
Expand Down Expand Up @@ -65,7 +65,7 @@ class YamlRenderer(
null,
elemBuilder,
s,
escapeUnicode = true,
escapeUnicode = false,
wrapQuotes = true
)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Regression test: YAML output must pass through Unicode natively.
// Golden verified against cpp-jsonnet 0.21.0, go-jsonnet 0.22.0, jrsonnet 0.5.0-pre99.
std.assertEqual(std.manifestYamlDoc("世界"), "\"世界\"") &&
std.assertEqual(std.manifestYamlDoc("café"), "\"café\"") &&
std.assertEqual(std.manifestYamlDoc({name: "世界", drink: "café"}),
"\"drink\": \"café\"\n\"name\": \"世界\"") &&
std.assertEqual(std.manifestYamlDoc(["🌍", "世界", "café"]),
"- \"🌍\"\n- \"世界\"\n- \"café\"") &&
true
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
true
Loading