Skip to content

Commit ef3e01b

Browse files
committed
syntax: add regression test for the errant HIR interval set optimizations
Fixes rust-lang#1103 Ref rust-lang#1051, Ref rust-lang#1102
1 parent b99cff0 commit ef3e01b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

testdata/regression.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -800,3 +800,16 @@ name = "non-prefix-literal-quit-state"
800800
regex = '.+\b\n'
801801
haystack = "β77\n"
802802
matches = [[0, 5]]
803+
804+
# This is a regression test for some errant HIR interval set operations that
805+
# were made in the regex-syntax 0.8.0 release and then reverted in 0.8.1. The
806+
# issue here is that the HIR produced from the regex had out-of-order ranges.
807+
#
808+
# See: https://github.com/rust-lang/regex/issues/1103
809+
# Ref: https://github.com/rust-lang/regex/pull/1051
810+
# Ref: https://github.com/rust-lang/regex/pull/1102
811+
[[test]]
812+
name = "hir-optimization-out-of-order-class"
813+
regex = '^[[:alnum:]./-]+$'
814+
haystack = "a-b"
815+
matches = [[0, 3]]

0 commit comments

Comments
 (0)