BIND 10 trac1626,	updated. 9a56eb7ebbefcaa29ea623bbf8d7102b6970ff70 [1626] Add some	more testcases
    BIND 10 source code commits 
    bind10-changes at lists.isc.org
       
    Mon Apr  2 06:51:24 UTC 2012
    
    
  
The branch, trac1626 has been updated
       via  9a56eb7ebbefcaa29ea623bbf8d7102b6970ff70 (commit)
      from  737c4eb744e7edcd77410a11000b49e17ca3af8b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 9a56eb7ebbefcaa29ea623bbf8d7102b6970ff70
Author: Mukund Sivaraman <muks at isc.org>
Date:   Mon Apr 2 12:21:07 2012 +0530
    [1626] Add some more testcases
-----------------------------------------------------------------------
Summary of changes:
 src/lib/cc/tests/data_unittests.cc |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/cc/tests/data_unittests.cc b/src/lib/cc/tests/data_unittests.cc
index 79b53ba..dbd860f 100644
--- a/src/lib/cc/tests/data_unittests.cc
+++ b/src/lib/cc/tests/data_unittests.cc
@@ -329,6 +329,16 @@ TEST(Element, escape) {
     // Bad escapes
     EXPECT_THROW(Element::fromJSON("\\a"), JSONError);
     EXPECT_THROW(Element::fromJSON("\\"), JSONError);
+    // Can't have escaped quotes outside strings
+    EXPECT_THROW(Element::fromJSON("\\\"\\\""), JSONError);
+    // Inside strings is OK
+    EXPECT_NO_THROW(Element::fromJSON("\"\\\"\\\"\""));
+    // String not terminated
+    EXPECT_THROW(Element::fromJSON("\"hello"), JSONError);
+    // Bad string
+    EXPECT_THROW(Element::fromJSON("hello\"foobar\""), JSONError);
+    // A whitespace test
+    EXPECT_NO_THROW(Element::fromJSON("  \n  \r \t  \n \n    \t"));
 }
 
 TEST(Element, ListElement) {
    
    
More information about the bind10-changes
mailing list