handle edge case when building dfa from a string, where an exception was raised when our search regex contains an alternation where the second alternation is a substring of the first alternation, and add a test for it to make sure that it passes
This commit is contained in:
@@ -67,6 +67,15 @@ struct
|
||||
in
|
||||
Expect.isTrue true
|
||||
end)
|
||||
, test
|
||||
"DfaGen does not cause exception \
|
||||
\when parsing alternation that contains a char \
|
||||
\from the previous alternation (1)"
|
||||
(fn _ =>
|
||||
(let val dfa = CaseSensitiveDfa.fromString "str|s"
|
||||
in Expect.isTrue true
|
||||
end)
|
||||
handle _ => Expect.isTrue false)
|
||||
]
|
||||
|
||||
val tests = [charEventTests]
|
||||
|
||||
Reference in New Issue
Block a user