[Pcre-svn] [1174] code/trunk/testdata: tests: Improve test c…

Kezdőlap
Üzenet törlése
Szerző: Subversion repository
Dátum:  
Címzett: pcre-svn
Tárgy: [Pcre-svn] [1174] code/trunk/testdata: tests: Improve test coverage for pcre_valid_utf8.c
Revision: 1174
          http://vcs.pcre.org/viewvc?view=rev&revision=1174
Author:   chpe
Date:     2012-10-24 22:29:12 +0100 (Wed, 24 Oct 2012)


Log Message:
-----------
tests: Improve test coverage for pcre_valid_utf8.c

Make sure to have a test for every PCRE_UTF8_ERRn.

Modified Paths:
--------------
    code/trunk/testdata/testinput15
    code/trunk/testdata/testoutput15


Modified: code/trunk/testdata/testinput15
===================================================================
--- code/trunk/testdata/testinput15    2012-10-24 18:14:10 UTC (rev 1173)
+++ code/trunk/testdata/testinput15    2012-10-24 21:29:12 UTC (rev 1174)
@@ -50,27 +50,52 @@
 /\xC3\xC3\xC3xxx/8?DZSS


 /abc/8
-    \xc3]
-    \xc3
-    \xc3\xc3\xc3
-    \xc3\xc3\xc3\?
-    \xe1\x88 
-    \P\xe1\x88 
-    \P\P\xe1\x88 
-    XX\xea
-    \O0XX\xea
-    \O1XX\xea
-    \O2XX\xea
-    XX\xf1
-    XX\xf8  
-    XX\xfc
-    ZZ\xea\xaf\x20YY
-    ZZ\xfd\xbf\xbf\x2f\xbf\xbfYY  
-    ZZ\xfd\xbf\xbf\xbf\x2f\xbfYY  
-    ZZ\xfd\xbf\xbf\xbf\xbf\x2fYY  
-    ZZ\xffYY
-    ZZ\xfeYY  
+    \xdf
+    \xef
+    \xef\x80
+    \xf7
+    \xf7\x80
+    \xf7\x80\x80
+    \xfb
+    \xfb\x80
+    \xfb\x80\x80
+    \xfb\x80\x80\x80
+    \xfd
+    \xfd\x80
+    \xfd\x80\x80
+    \xfd\x80\x80\x80
+    \xfd\x80\x80\x80\x80
+    \xdf\x7f
+    \xef\x7f\x80
+    \xef\x80\x7f
+    \xf7\x7f\x80\x80
+    \xf7\x80\x7f\x80
+    \xf7\x80\x80\x7f
+    \xfb\x7f\x80\x80\x80
+    \xfb\x80\x7f\x80\x80
+    \xfb\x80\x80\x7f\x80
+    \xfb\x80\x80\x80\x7f
+    \xfd\x7f\x80\x80\x80\x80
+    \xfd\x80\x7f\x80\x80\x80
+    \xfd\x80\x80\x7f\x80\x80
+    \xfd\x80\x80\x80\x7f\x80
+    \xfd\x80\x80\x80\x80\x7f
+    \xed\xa0\x80
+    \xc0\x8f
+    \xe0\x80\x8f
+    \xf0\x80\x80\x8f
+    \xf8\x80\x80\x80\x8f
+    \xfc\x80\x80\x80\x80\x8f
+    \x80
+    \xfe
+    \xff
+    \xef\xb7\x90


+/abc/8
+    \xfb\x80\x80\x80\x80
+    \xfd\x80\x80\x80\x80\x80
+    \xf7\xbf\xbf\xbf
+
 /anything/8
     \xc0\x80
     \xc1\x8f 


Modified: code/trunk/testdata/testoutput15
===================================================================
--- code/trunk/testdata/testoutput15    2012-10-24 18:14:10 UTC (rev 1173)
+++ code/trunk/testdata/testoutput15    2012-10-24 21:29:12 UTC (rev 1174)
@@ -85,47 +85,95 @@
 Need char = 'x'


 /abc/8
-    \xc3]
-Error -10 (bad UTF-8 string) offset=0 reason=6
-    \xc3
+    \xdf
 Error -10 (bad UTF-8 string) offset=0 reason=1
-    \xc3\xc3\xc3
-Error -10 (bad UTF-8 string) offset=0 reason=6
-    \xc3\xc3\xc3\?
-No match
-    \xe1\x88 
+    \xef
+Error -10 (bad UTF-8 string) offset=0 reason=2
+    \xef\x80
 Error -10 (bad UTF-8 string) offset=0 reason=1
-    \P\xe1\x88 
+    \xf7
+Error -10 (bad UTF-8 string) offset=0 reason=3
+    \xf7\x80
+Error -10 (bad UTF-8 string) offset=0 reason=2
+    \xf7\x80\x80
 Error -10 (bad UTF-8 string) offset=0 reason=1
-    \P\P\xe1\x88 
-Error -25 (short UTF-8 string) offset=0 reason=1
-    XX\xea
-Error -10 (bad UTF-8 string) offset=2 reason=2
-    \O0XX\xea
-Error -10 (bad UTF-8 string)
-    \O1XX\xea
-Error -10 (bad UTF-8 string)
-    \O2XX\xea
-Error -10 (bad UTF-8 string) offset=2 reason=2
-    XX\xf1
-Error -10 (bad UTF-8 string) offset=2 reason=3
-    XX\xf8  
-Error -10 (bad UTF-8 string) offset=2 reason=4
-    XX\xfc
-Error -10 (bad UTF-8 string) offset=2 reason=5
-    ZZ\xea\xaf\x20YY
-Error -10 (bad UTF-8 string) offset=2 reason=7
-    ZZ\xfd\xbf\xbf\x2f\xbf\xbfYY  
-Error -10 (bad UTF-8 string) offset=2 reason=8
-    ZZ\xfd\xbf\xbf\xbf\x2f\xbfYY  
-Error -10 (bad UTF-8 string) offset=2 reason=9
-    ZZ\xfd\xbf\xbf\xbf\xbf\x2fYY  
-Error -10 (bad UTF-8 string) offset=2 reason=10
-    ZZ\xffYY
-Error -10 (bad UTF-8 string) offset=2 reason=21
-    ZZ\xfeYY  
-Error -10 (bad UTF-8 string) offset=2 reason=21
+    \xfb
+Error -10 (bad UTF-8 string) offset=0 reason=4
+    \xfb\x80
+Error -10 (bad UTF-8 string) offset=0 reason=3
+    \xfb\x80\x80
+Error -10 (bad UTF-8 string) offset=0 reason=2
+    \xfb\x80\x80\x80
+Error -10 (bad UTF-8 string) offset=0 reason=1
+    \xfd
+Error -10 (bad UTF-8 string) offset=0 reason=5
+    \xfd\x80
+Error -10 (bad UTF-8 string) offset=0 reason=4
+    \xfd\x80\x80
+Error -10 (bad UTF-8 string) offset=0 reason=3
+    \xfd\x80\x80\x80
+Error -10 (bad UTF-8 string) offset=0 reason=2
+    \xfd\x80\x80\x80\x80
+Error -10 (bad UTF-8 string) offset=0 reason=1
+    \xdf\x7f
+Error -10 (bad UTF-8 string) offset=0 reason=6
+    \xef\x7f\x80
+Error -10 (bad UTF-8 string) offset=0 reason=6
+    \xef\x80\x7f
+Error -10 (bad UTF-8 string) offset=0 reason=7
+    \xf7\x7f\x80\x80
+Error -10 (bad UTF-8 string) offset=0 reason=6
+    \xf7\x80\x7f\x80
+Error -10 (bad UTF-8 string) offset=0 reason=7
+    \xf7\x80\x80\x7f
+Error -10 (bad UTF-8 string) offset=0 reason=8
+    \xfb\x7f\x80\x80\x80
+Error -10 (bad UTF-8 string) offset=0 reason=6
+    \xfb\x80\x7f\x80\x80
+Error -10 (bad UTF-8 string) offset=0 reason=7
+    \xfb\x80\x80\x7f\x80
+Error -10 (bad UTF-8 string) offset=0 reason=8
+    \xfb\x80\x80\x80\x7f
+Error -10 (bad UTF-8 string) offset=0 reason=9
+    \xfd\x7f\x80\x80\x80\x80
+Error -10 (bad UTF-8 string) offset=0 reason=6
+    \xfd\x80\x7f\x80\x80\x80
+Error -10 (bad UTF-8 string) offset=0 reason=7
+    \xfd\x80\x80\x7f\x80\x80
+Error -10 (bad UTF-8 string) offset=0 reason=8
+    \xfd\x80\x80\x80\x7f\x80
+Error -10 (bad UTF-8 string) offset=0 reason=9
+    \xfd\x80\x80\x80\x80\x7f
+Error -10 (bad UTF-8 string) offset=0 reason=10
+    \xed\xa0\x80
+Error -10 (bad UTF-8 string) offset=0 reason=14
+    \xc0\x8f
+Error -10 (bad UTF-8 string) offset=0 reason=15
+    \xe0\x80\x8f
+Error -10 (bad UTF-8 string) offset=0 reason=16
+    \xf0\x80\x80\x8f
+Error -10 (bad UTF-8 string) offset=0 reason=17
+    \xf8\x80\x80\x80\x8f
+Error -10 (bad UTF-8 string) offset=0 reason=18
+    \xfc\x80\x80\x80\x80\x8f
+Error -10 (bad UTF-8 string) offset=0 reason=19
+    \x80
+Error -10 (bad UTF-8 string) offset=0 reason=20
+    \xfe
+Error -10 (bad UTF-8 string) offset=0 reason=21
+    \xff
+Error -10 (bad UTF-8 string) offset=0 reason=21
+    \xef\xb7\x90
+Error -10 (bad UTF-8 string) offset=0 reason=22


+/abc/8
+    \xfb\x80\x80\x80\x80
+Error -10 (bad UTF-8 string) offset=0 reason=11
+    \xfd\x80\x80\x80\x80\x80
+Error -10 (bad UTF-8 string) offset=0 reason=12
+    \xf7\xbf\xbf\xbf
+Error -10 (bad UTF-8 string) offset=0 reason=13
+
 /anything/8
     \xc0\x80
 Error -10 (bad UTF-8 string) offset=0 reason=15