]> granicus.if.org Git - taglib/commitdiff
Add a few more test cases for invalid UTF-8 sequences.
authorTsuda Kageyu <tsuda.kageyu@gmail.com>
Mon, 30 Jan 2017 03:56:53 +0000 (12:56 +0900)
committerTsuda Kageyu <tsuda.kageyu@gmail.com>
Mon, 30 Jan 2017 03:56:53 +0000 (12:56 +0900)
tests/test_string.cpp

index 0ade0113a3629dd828a23ad433d17e5964c95ac1..1bd29ff5c14abc180f85ff1c5b44163491d3a533 100644 (file)
@@ -350,6 +350,9 @@ public:
     CPPUNIT_ASSERT(String(ByteVector("\xFC\x80\x80\x80\x80\x80"), String::UTF8).isEmpty());
 
     CPPUNIT_ASSERT(String('\x80', String::UTF8).isEmpty());
+
+    CPPUNIT_ASSERT(String(ByteVector("\xED\xA0\x80\xED\xB0\x80"), String::UTF8).isEmpty());
+    CPPUNIT_ASSERT(String(ByteVector("\xED\xB0\x80\xED\xA0\x80"), String::UTF8).isEmpty());
   }
 
 };