123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345 |
- /-- This set of tests is run only with the 8-bit library. They do not require
- UTF-8 or Unicode property support. The file starts with all the tests of
- the POSIX interface, because that is supported only with the 8-bit library.
- --/
-
- < forbid 8W
- /abc/P
- abc
- *** Failers
- /^abc|def/P
- abcdef
- abcdef\B
- /.*((abc)$|(def))/P
- defabc
- \Zdefabc
- /the quick brown fox/P
- the quick brown fox
- *** Failers
- The Quick Brown Fox
- /the quick brown fox/Pi
- the quick brown fox
- The Quick Brown Fox
- /abc.def/P
- *** Failers
- abc\ndef
- /abc$/P
- abc
- abc\n
- /(abc)\2/P
- /(abc\1)/P
- abc
- /a*(b+)(z)(z)/P
- aaaabbbbzzzz
- aaaabbbbzzzz\O0
- aaaabbbbzzzz\O1
- aaaabbbbzzzz\O2
- aaaabbbbzzzz\O3
- aaaabbbbzzzz\O4
- aaaabbbbzzzz\O5
- /ab.cd/P
- ab-cd
- ab=cd
- ** Failers
- ab\ncd
- /ab.cd/Ps
- ab-cd
- ab=cd
- ab\ncd
- /a(b)c/PN
- abc
- /a(?P<name>b)c/PN
- abc
- /a?|b?/P
- abc
- ** Failers
- ddd\N
- /\w+A/P
- CDAAAAB
- /\w+A/PU
- CDAAAAB
-
- /\Biss\B/I+P
- Mississippi
- /abc/\P
- /-- End of POSIX tests --/
- /a\Cb/
- aXb
- a\nb
- ** Failers (too big char)
- A\x{123}B
- A\o{443}B
-
- /\x{100}/I
- /\o{400}/I
- / (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* # optional leading comment
- (?: (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- |
- " (?: # opening quote...
- [^\\\x80-\xff\n\015"] # Anything except backslash and quote
- | # or
- \\ [^\x80-\xff] # Escaped something (something != CR)
- )* " # closing quote
- ) # initial word
- (?: (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* \. (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- |
- " (?: # opening quote...
- [^\\\x80-\xff\n\015"] # Anything except backslash and quote
- | # or
- \\ [^\x80-\xff] # Escaped something (something != CR)
- )* " # closing quote
- ) )* # further okay, if led by a period
- (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* @ (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- | \[ # [
- (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
- \] # ]
- ) # initial subdomain
- (?: #
- (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* \. # if led by a period...
- (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- | \[ # [
- (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
- \] # ]
- ) # ...further okay
- )*
- # address
- | # or
- (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- |
- " (?: # opening quote...
- [^\\\x80-\xff\n\015"] # Anything except backslash and quote
- | # or
- \\ [^\x80-\xff] # Escaped something (something != CR)
- )* " # closing quote
- ) # one word, optionally followed by....
- (?:
- [^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] | # atom and space parts, or...
- \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) | # comments, or...
- " (?: # opening quote...
- [^\\\x80-\xff\n\015"] # Anything except backslash and quote
- | # or
- \\ [^\x80-\xff] # Escaped something (something != CR)
- )* " # closing quote
- # quoted strings
- )*
- < (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* # leading <
- (?: @ (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- | \[ # [
- (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
- \] # ]
- ) # initial subdomain
- (?: #
- (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* \. # if led by a period...
- (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- | \[ # [
- (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
- \] # ]
- ) # ...further okay
- )*
- (?: (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* , (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* @ (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- | \[ # [
- (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
- \] # ]
- ) # initial subdomain
- (?: #
- (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* \. # if led by a period...
- (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- | \[ # [
- (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
- \] # ]
- ) # ...further okay
- )*
- )* # further okay, if led by comma
- : # closing colon
- (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* )? # optional route
- (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- |
- " (?: # opening quote...
- [^\\\x80-\xff\n\015"] # Anything except backslash and quote
- | # or
- \\ [^\x80-\xff] # Escaped something (something != CR)
- )* " # closing quote
- ) # initial word
- (?: (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* \. (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- |
- " (?: # opening quote...
- [^\\\x80-\xff\n\015"] # Anything except backslash and quote
- | # or
- \\ [^\x80-\xff] # Escaped something (something != CR)
- )* " # closing quote
- ) )* # further okay, if led by a period
- (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* @ (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- | \[ # [
- (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
- \] # ]
- ) # initial subdomain
- (?: #
- (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* \. # if led by a period...
- (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- | \[ # [
- (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
- \] # ]
- ) # ...further okay
- )*
- # address spec
- (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* > # trailing >
- # name and address
- ) (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* # optional trailing comment
- /xSI
- /-- Although this saved pattern was compiled with link-size=2, it does no harm
- to run this test with other link sizes because it is going to generated a
- "compiled in wrong mode" error as soon as it is loaded, so the link size does
- not matter. --/
- <!testsaved16
- <!testsaved32
- /\h/SI
- /\H/SI
- /\v/SI
- /\V/SI
- /\R/SI
- /[\h]/BZ
- >\x09<
- /[\h]+/BZ
- >\x09\x20\xa0<
- /[\v]/BZ
- /[\H]/BZ
- /[^\h]/BZ
- /[\V]/BZ
- /[\x0a\V]/BZ
- /\777/I
- /(*:0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF)XX/K
- XX
-
- /(*:0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDE)XX/K
- XX
- /\u0100/<JS>
- /[\u0100-\u0200]/<JS>
- /[^\x00-a]{12,}[^b-\xff]*/BZ
- /[^\s]*\s* [^\W]+\W+ [^\d]*?\d0 [^\d\w]{4,6}?\w*A/BZ
- /(?'ABC'[bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar](*THEN:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))/
- /-- End of testinput14 --/
|