diff options
author | Milo Yip <miloyip@gmail.com> | 2019-11-14 05:41:50 +0300 |
---|---|---|
committer | Milo Yip <miloyip@gmail.com> | 2019-11-14 05:41:50 +0300 |
commit | be9f30b664259129f8f361b5f84f01053167564c (patch) | |
tree | 7e50c3231b87139417a281c70d845684a4165206 | |
parent | 6534506e829a489bda78bc5eac5faa34da0a2c51 (diff) |
Reproduce issue 1604
-rw-r--r-- | test/unittest/documenttest.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/unittest/documenttest.cpp b/test/unittest/documenttest.cpp index 54298027..2b0f269f 100644 --- a/test/unittest/documenttest.cpp +++ b/test/unittest/documenttest.cpp @@ -625,6 +625,12 @@ TYPED_TEST(DocumentMove, MoveAssignmentParseError) { EXPECT_EQ(c.GetErrorOffset(), error.Offset()); } +TEST(Document, Issue1604_ASCIIValidation) { + GenericDocument<ASCII<> > d; + d.Parse<kParseValidateEncodingFlag>("\"\\u1234\""); + EXPECT_EQ(kParseErrorStringInvalidEncoding, d.GetParseError()); +} + // This test does not properly use parsing, just for testing. // It must call ClearStack() explicitly to prevent memory leak. // But here we cannot as ClearStack() is private. |