Commit 84a03566 authored by John Stiles's avatar John Stiles

Add unit test for Issue 889

parent 33a9f585
......@@ -100,6 +100,19 @@ TEST(Writer, String) {
#endif
}
TEST(Writer, Issue_889) {
char buf[100] = "Hello";
StringBuffer buffer;
Writer<StringBuffer> writer(buffer);
writer.StartArray();
writer.String(buf);
writer.EndArray();
EXPECT_STREQ("[\"Hello\"]", buffer.GetString());
EXPECT_TRUE(writer.IsComplete()); \
}
TEST(Writer, ScanWriteUnescapedString) {
const char json[] = "[\" \\\"0123456789ABCDEF\"]";
// ^ scanning stops here.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment