[glib] tests: clean up for Unicode corrigendum #9



commit e359bc09c2dc2f4feca1f4aec2ca6602aef870d1
Author: Ryan Lortie <desrt desrt ca>
Date:   Tue Mar 12 12:32:16 2013 -0400

    tests: clean up for Unicode corrigendum #9
    
    Unicode corrigendum #9 spells out in no uncertain terms that on
    conversion interfaces we should not reject characters like U+FFFE and
    U+FFFF which we were doing before.
    
    Commit f91ef4ef15d220f6899c97aaf5b1c0a8f68cfe9a started accepting these
    characters, but we had some testcases that were checking that strings
    containing these characters should be rejected.
    
    Update the tests.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=694669

 glib/tests/utf8-validate.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/glib/tests/utf8-validate.c b/glib/tests/utf8-validate.c
index e570d5a..390625f 100644
--- a/glib/tests/utf8-validate.c
+++ b/glib/tests/utf8-validate.c
@@ -72,7 +72,7 @@ Test test[] = {
   /* last sequence of each length */
   { "\x7f", -1, 1, TRUE },
   { "\xdf\xbf", -1, 2, TRUE },
-  { "\xef\xbf\xbf", -1, 0, FALSE },
+  { "\xef\xbf\xbf", -1, 3, TRUE },
   { "\xf7\xbf\xbf\xbf", -1, 0, FALSE },
   { "\xfb\xbf\xbf\xbf\xbf", -1, 0, FALSE },
   { "\xfd\xbf\xbf\xbf\xbf\xbf", -1, 0, FALSE },
@@ -80,7 +80,7 @@ Test test[] = {
   { "\xed\x9f\xbf", -1, 3, TRUE },
   { "\xee\x80\x80", -1, 3, TRUE },
   { "\xef\xbf\xbd", -1, 3, TRUE },
-  { "\xf4\x8f\xbf\xbf", -1, 0, FALSE },
+  { "\xf4\x8f\xbf\xbf", -1, 4, TRUE },
   { "\xf4\x90\x80\x80", -1, 0, FALSE },
   /* malformed sequences */
   /* continuation bytes */
@@ -267,8 +267,6 @@ Test test[] = {
   { "\x20\xed\xae\x80\xed\xbf\xbf\x20", -1, 1, FALSE },
   { "\x20\xed\xaf\xbf\xed\xb0\x80\x20", -1, 1, FALSE },
   { "\x20\xed\xaf\xbf\xed\xbf\xbf\x20", -1, 1, FALSE },
-  { "\x20\xef\xbf\xbe\x20", -1, 1, FALSE },
-  { "\x20\xef\xbf\xbf\x20", -1, 1, FALSE },
 
   { NULL, }
 };


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]