# This stops me getting screenfulls of syntax errors every time I accidentally
# run this file via a shell glob. The full format of this file is given
# in regexp.t
-# Can't use \N{VALID NAME TEST} here because need 'use charnames'; but can use
-# \N{U+valid} here.
+# Prior to the implementation of autoloading of \N{}, tests that used \N{name}
+# could not go in this file, and were farmed out to other .t's.
#
# pat string y/n/etc expr expected-expr skip-reason
__END__
'(ab)\d\1'i ab4Ab y $1 ab
foo\w*\d{4}baz foobar1234baz y $& foobar1234baz
a(?{})b cabd y $& ab
-a(?{)b - c - Sequence (?{...}) not terminated or not {}-balanced
-a(?{{})b - c - Sequence (?{...}) not terminated or not {}-balanced
+a(?{f()+ - c - Missing right curly or square bracket
+a(?{{1}+ - c - Missing right curly or square bracket
a(?{}})b - c -
-a(?{"{"})b - c - Sequence (?{...}) not terminated or not {}-balanced
+a(?{"{"})b ab y - -
a(?{"\{"})b cabd y $& ab
-a(?{"{"}})b - c - Unmatched right curly bracket
+a(?{"{"}})b - c - Sequence (?{...}) not terminated with ')'
a(?{$::bl="\{"}).b caxbd y $::bl {
x(~~)*(?:(?:F)?)? x~~ y - -
^a(?#xxx){3}c aaac y $& aaac
/^\p{L}/ \x{3400} y $& \x{3400}
# RT #89774
-/s\xDF/ui \xDFs yT $& \xDFs
+/[s\xDF]/ui \xDFs ybT $& \xDFs
# RT #99928
-/^\R\x0A$/ \x0D\x0A yT $& \x0D\x0A
+/^\R\x0A$/ \x0D\x0A n - -
/ff/i \x{FB00}\x{FB01} y $& \x{FB00}
/ff/i \x{FB01}\x{FB00} y $& \x{FB00}
/fi/i \x{FB01}\x{FB00} y $& \x{FB01}
/fi/i \x{FB00}\x{FB01} y $& \x{FB01}
+#
+# Make sure we don't see code blocks where there aren't, and vice-versa
+(?#( (?{1+)a a y - -
+'a# (?{1+'x a y - -
+ab[(?{1] ab1 y - -
+ab[(?{1\](?{2] ab2 y - -
+ab(?{"["})cd abcd y - -
+ab\[(?{1})c ab[c y - -
# These test that doesn't cut-off matching too soon in the string for
# multi-char folds
/ffiffl/i abcdef\x{FB03}\x{FB04} y $& \x{FB03}\x{FB04}
/\xdf\xdf/ui abcdefssss y $& ssss
+/st/i \x{DF}\x{FB05} y $& \x{FB05}
+/ssst/i \x{DF}\x{FB05} y $& \x{DF}\x{FB05}
+
+# [perl #101970]
+/[[:lower:]]/i \x{100} y $& \x{100}
+/[[:upper:]]/i \x{101} y $& \x{101}
+
+# Was matching 'ss' only and failing the entire match, not seeing the
+# alternative that would succeed
+/s\xDF/ui \xDFs y $& \xDFs
+/sst/ui s\N{LATIN SMALL LIGATURE ST} y $& s\N{LATIN SMALL LIGATURE ST}
+/sst/ui s\N{LATIN SMALL LIGATURE LONG S T} y $& s\N{LATIN SMALL LIGATURE LONG S T}
+
+# /i properties shouldn't match more than the property itself
+/[[:ascii:]]/i \N{KELVIN SIGN} n - -
+
+# [[:lower:]]/i and [[:upper:]]/i should match what \p{Lower} and \p{Upper} do.
+# which is \p{Cased}, not \p{Alpha},
+/[[:lower:]]/i \N{U+3400} n - -
+/[[:upper:]]/i \N{U+01BB} n - -
+
+# [perl #110648]
+[^\p{Alphabetic}] \x{100} n - -
+
+# [perl #111400]. Tests the first Y/N boundary above 255 for each of these.
+/[[:alnum:]]/ \x{2c1} y - -
+/[[:alnum:]]/ \x{2c2} n - -
+/[[:alpha:]]/ \x{2c1} y - -
+/[[:alpha:]]/ \x{2c2} n - -
+/[[:graph:]]/ \x{377} y - -
+/[[:graph:]]/ \x{378} n - -
+/[[:lower:]]/ \x{100} n - -
+/[[:lower:]]/ \x{101} y - -
+/[[:lower:]]/ \x{102} n - -
+/[[:print:]]/ \x{377} y - -
+/[[:print:]]/ \x{378} n - -
+/[[:punct:]]/ \x{37D} n - -
+/[[:punct:]]/ \x{37E} y - -
+/[[:punct:]]/ \x{388} n - -
+/[[:upper:]]/ \x{100} y - -
+/[[:upper:]]/ \x{101} n - -
+/[[:word:]]/ \x{2c1} y - -
+/[[:word:]]/ \x{2c2} n - -
+
+# [perl #113400]
+/syntax OK\s+\z/si t/bin/good.pl syntax OK\n y - -
+
+/^(.*?)\s*\|\s*(?:\/\s*|)'(.+)'$/ text|'sec' y <$1><$2> <text><sec>
+/^(foo|)bar$/ bar y <$&> <bar>
+/^(foo||baz)bar$/ bar y <$&> <bar>
+/^(foo||baz)bar$/ bazbar y <$1> <baz>
+/^(foo||baz)bar$/ foobar y <$1> <foo>
+
+/^(?:foo|)bar$/ bar y <$&> <bar>
+/^(?:foo||baz)bar$/ bar y <$&> <bar>
+/^(?:foo||baz)bar$/ bazbar y <$&> <bazbar>
+/^(?:foo||baz)bar$/ foobar y <$&> <foobar>
+
+/^(?i:foo|)bar$/ bar y <$&> <bar>
+/^(?i:foo||baz)bar$/ bar y <$&> <bar>
+/^(?i:foo||baz)bar$/ bazbar y <$&> <bazbar>
+/^(?i:foo||baz)bar$/ foobar y <$&> <foobar>
+
# vim: softtabstop=0 noexpandtab