Index: runtime/vm/json_test.cc |
diff --git a/runtime/vm/json_test.cc b/runtime/vm/json_test.cc |
index 39a8eeebe097c93a222835def8af3b1dab5e1ed3..bdbfc26aa414636231ee7b33f1360556ed66e07a 100644 |
--- a/runtime/vm/json_test.cc |
+++ b/runtime/vm/json_test.cc |
@@ -251,5 +251,12 @@ TEST_CASE(JSON_JSONStream_DartObject) { |
tb.buf()); |
} |
+TEST_CASE(JSON_JSONStream_EscapedString) { |
+ TextBuffer tb(256); |
+ JSONStream js(&tb); |
+ js.PrintValue("Hel\"\"lo\r\n\t"); |
+ EXPECT_STREQ("\"Hel\\\"\\\"lo\\r\\n\\t\"", tb.buf()); |
+} |
+ |
} // namespace dart |