[Pcre-svn] [791] code/trunk/testdata: Tests update.

Top Page
Delete this message
Author: Subversion repository
Date:  
To: pcre-svn
Subject: [Pcre-svn] [791] code/trunk/testdata: Tests update.
Revision: 791
          http://www.exim.org/viewvc/pcre2?view=rev&revision=791
Author:   ph10
Date:     2017-05-19 17:41:10 +0100 (Fri, 19 May 2017)
Log Message:
-----------
Tests update.


Modified Paths:
--------------
    code/trunk/testdata/testinput24
    code/trunk/testdata/testinput25
    code/trunk/testdata/testoutput24
    code/trunk/testdata/testoutput25


Modified: code/trunk/testdata/testinput24
===================================================================
--- code/trunk/testdata/testinput24    2017-05-19 03:55:39 UTC (rev 790)
+++ code/trunk/testdata/testinput24    2017-05-19 16:41:10 UTC (rev 791)
@@ -27,9 +27,9 @@


# Length check

-/abc/convert_length=7
+/abc/convert_length=11

-/abc/convert_length=8
+/abc/convert_length=12

# Now some actual tests

@@ -98,6 +98,8 @@
 /a[]]b/
     a]b


+/a[]a-]b/
+
 /a[]-]b/
     a-b
     a]b
@@ -104,7 +106,7 @@
 \= Expect no match
     aab


-/a[]a-]b/
+/a[]a-z]b/
     aab


/]/

Modified: code/trunk/testdata/testinput25
===================================================================
--- code/trunk/testdata/testinput25    2017-05-19 03:55:39 UTC (rev 790)
+++ code/trunk/testdata/testinput25    2017-05-19 16:41:10 UTC (rev 791)
@@ -10,9 +10,9 @@


#pattern convert=glob_basic,convert_glob_separator=/

-# The fact that this one works in 9 bytes in the 8-bit library shows that the
+# The fact that this one works in 13 bytes in the 8-bit library shows that the
# output is in UTF-8, though pcre2test shows the character as an escape.

-/'>' c4 a3 '<'/hex,utf,convert_length=9
+/'>' c4 a3 '<'/hex,utf,convert_length=13

# End of testinput25

Modified: code/trunk/testdata/testoutput24
===================================================================
--- code/trunk/testdata/testoutput24    2017-05-19 03:55:39 UTC (rev 790)
+++ code/trunk/testdata/testoutput24    2017-05-19 16:41:10 UTC (rev 791)
@@ -22,10 +22,10 @@
 # Can't have separator in a class


"[ab/cd]"
-** Pattern conversion error at offset 3: invalid syntax
+(?s)\A(?!/)[ab/cd]\z

"[,-/]"
-** Pattern conversion error at offset 3: invalid syntax
+(?s)\A(?!/)[,-/]\z

/[ab/
** Pattern conversion error at offset 3: missing terminating ] for character class
@@ -32,16 +32,16 @@

# Length check

-/abc/convert_length=7
+/abc/convert_length=11
** Pattern conversion error at offset 3: no more memory

-/abc/convert_length=8
-\Aabc\z
+/abc/convert_length=12
+(?s)\Aabc\z

# Now some actual tests

 /a?b[]xy]*c/
-\Aa[^/]b[]xy][^/]*c\z
+(?s)\Aa[^/]b(?!/)[\]xy](*COMMIT)[^/]*?c\z
     azb]1234c
  0: azb]1234c


@@ -62,7 +62,7 @@
0:

 /???/
-\A(?!\.)[^/][^/][^/]\z
+(?s)\A[^/][^/][^/]\z
     foo
  0: foo
 \= Expect no match
@@ -70,7 +70,7 @@
 No match


 /*/
-(?s)\A[^\/]*?\z
+(?s)\A[^/]*?\z
     foo
  0: foo
     \
@@ -77,7 +77,7 @@
  0: 


 /f*/
-(?s)\Af(*COMMIT)[^\/]*?\z
+(?s)\Af(*COMMIT)[^/]*?\z
     foo
  0: foo
     f
@@ -84,7 +84,7 @@
  0: f


 /*f/
-(?s)\A(?!\.).*(?<=f)\z
+(?s)\A[^/]*?f\z
     oof
  0: oof
 \= Expect no match
@@ -92,7 +92,7 @@
 No match


 /*foo*/
-\A(?!\.)[^/]*foo[^/]*\z
+(?s)\A[^/]*?foo(*COMMIT)[^/]*?\z
     foo
  0: foo
     food
@@ -101,12 +101,12 @@
  0: aprilfool


 /*ob*a*r*/
-\A(?!\.)[^/]*ob[^/]*a[^/]*r[^/]*\z
+(?s)\A[^/]*?ob(*COMMIT)[^/]*?a(*COMMIT)[^/]*?r(*COMMIT)[^/]*?\z
     foobar
  0: foobar


 /*ab/
-(?s)\A(?!\.).*(?<=ab)\z
+(?s)\A[^/]*?ab\z
     aaaaaaabababab
  0: aaaaaaabababab


@@ -127,48 +127,48 @@
0: f\oo

 /*[al]?/
-(?s)\A(?!\.).*(?<=[al][^/])\z
+(?s)\A[^/]*?(?!/)[al][^/]\z
     ball
  0: ball


 /[ten]/
-\A(?!\.)[ten]\z
+(?s)\A(?!/)[ten]\z
 \= Expect no match
     ten
 No match


 /t[a-g]n/
-\At[a-g]n\z
+(?s)\At(?!/)[a-g]n\z
     ten
  0: ten


 /a[]]b/
-\Aa[]]b\z
+(?s)\Aa(?!/)[\]]b\z
     a]b
  0: a]b


+/a[]a-]b/
+** Pattern conversion error at offset 7: missing terminating ] for character class
+
 /a[]-]b/
-\Aa[]-]b\z
+** Pattern conversion error at offset 6: missing terminating ] for character class
     a-b
- 0: a-b
     a]b
- 0: a]b
 \= Expect no match
     aab
-No match


-/a[]a-]b/
-\Aa[]a-]b\z
+/a[]a-z]b/
+(?s)\Aa(?!/)[\]a-z]b\z
     aab
  0: aab


 /]/
-\A\]\z
+(?s)\A\]\z
     ]
  0: ]


 /t[!a-g]n/
-\At[^a-g]n\z
+(?s)\At[^/a-g]n\z
     ton
  0: ton
 \= Expect no match
@@ -176,12 +176,12 @@
 No match


 '[[:alpha:]][[:digit:]][[:upper:]]'
-\A(?!\.)[[:alpha:]][[:digit:]][[:upper:]]\z
+(?s)\A(?!/)[[:alpha:]](?!/)[[:digit:]](?!/)[[:upper:]]\z
     a1B
  0: a1B


 '[[:digit:][:upper:][:space:]]'
-\A(?!\.)[[:digit:][:upper:][:space:]]\z
+(?s)\A(?!/)[[:digit:][:upper:][:space:]]\z
     A
  0: A
     1
@@ -195,7 +195,7 @@
 No match


 '[a-c[:digit:]x-z]'
-\A(?!\.)[a-c[:digit:]x-z]\z
+(?s)\A(?!/)[a-c[:digit:]x-z]\z
     5
  0: 5
     b
@@ -209,11 +209,11 @@
 # End of gitwildmatch tests


 /*.j?g/
-(?s)\A(?!\.).*(?<=\.j[^/]g)\z
+(?s)\A[^/]*?\.j[^/]g\z
     pic01.jpg
  0: pic01.jpg
     .jpg
-No match
+ 0: .jpg
     pic02.jxg
  0: pic02.jxg
 \= Expect no match
@@ -221,7 +221,7 @@
 No match


 /A[+-0]B/
-\AA[+-0](?<!/)B\z
+(?s)\AA(?!/)[+-0]B\z
     A+B
  0: A+B
     A.B
@@ -233,23 +233,23 @@
 No match


 /*x?z/
-(?s)\A(?!\.).*(?<=x[^/]z)\z
+(?s)\A[^/]*?x[^/]z\z
     abc.xyz
  0: abc.xyz
 \= Expect no match
     .xyz
-No match
+ 0: .xyz


 /?x?z/
-\A(?!\.)[^/]x[^/]z\z
+(?s)\A[^/]x[^/]z\z
     axyz
  0: axyz
 \= Expect no match
     .xyz
-No match
+ 0: .xyz


 "[,-0]x?z"
-\A(?!\.)[,-0](?<!/)x[^/]z\z
+(?s)\A(?!/)[,-0]x[^/]z\z
     ,xyz
  0: ,xyz
 \= Expect no match
@@ -256,15 +256,15 @@
     /xyz
 No match
     .xyz
-No match
+ 0: .xyz


 ".x*"
-\A\.x[^/]*\z
+(?s)\A\.x(*COMMIT)[^/]*?\z
     .xabc
  0: .xabc


 /a[--0]z/
-\Aa[--0](?<!/)z\z
+(?s)\Aa(?!/)[\--0]z\z
     a-z
  0: a-z
     a.z
@@ -278,7 +278,7 @@
 No match


 /<[a-c-d]>/
-\A<[a-c-d]>\z
+(?s)\A<(?!/)[a-c-d]>\z
     <a>
  0: <a>
     <b>
@@ -291,7 +291,7 @@
  0: <->


 /a[[:digit:].]z/
-\Aa[[:digit:].]z\z
+(?s)\Aa(?!/)[[:digit:].]z\z
     a1z
  0: a1z
     a.z
@@ -301,38 +301,29 @@
 No match


 /a[[:digit].]z/
-\Aa[[:digit]\.\]z\z
+** Pattern conversion error at offset 10: missing terminating ] for character class
     a[.]z
- 0: a[.]z
     a:.]z
- 0: a:.]z
     ad.]z
- 0: ad.]z


 /<[[:a[:digit:]b]>/
-\A<[[:a[:digit:]b]>\z
+** Pattern conversion error at offset 6: missing terminating ] for character class
     <[>
- 0: <[>
     <:>
- 0: <:>
     <a>
- 0: <a>
     <9>
- 0: <9>
     <b>
- 0: <b>
 \= Expect no match
     <d>
-No match


/a*b/convert_glob_separator=\
-\Aa[^\\]*b\z
+(?s)\Aa(*COMMIT)[^\\]*?b\z

/a*b/convert_glob_separator=.
-\Aa[^.]*b\z
+(?s)\Aa(*COMMIT)[^\.]*?b\z

/a*b/convert_glob_separator=/
-\Aa[^/]*b\z
+(?s)\Aa(*COMMIT)[^/]*?b\z

# Non control character checking


Modified: code/trunk/testdata/testoutput25
===================================================================
--- code/trunk/testdata/testoutput25    2017-05-19 03:55:39 UTC (rev 790)
+++ code/trunk/testdata/testoutput25    2017-05-19 16:41:10 UTC (rev 791)
@@ -10,10 +10,10 @@


#pattern convert=glob_basic,convert_glob_separator=/

-# The fact that this one works in 9 bytes in the 8-bit library shows that the
+# The fact that this one works in 13 bytes in the 8-bit library shows that the
# output is in UTF-8, though pcre2test shows the character as an escape.

-/'>' c4 a3 '<'/hex,utf,convert_length=9
-\A>\x{123}<\z
+/'>' c4 a3 '<'/hex,utf,convert_length=13
+(?s)\A>\x{123}<\z

# End of testinput25