This commit is contained in:
swrup 2025-11-11 02:07:51 +01:00
parent aa2ff7b2f0
commit 2f3113f55d
11742 changed files with 1223940 additions and 0 deletions

View file

@ -0,0 +1,12 @@
open Import
let () = Printexc.record_backtrace false
let any = Re.(compile (rep any))
let%expect_test "bound errors" =
let (_ : bool) = Re.execp any ~pos:4 "foo" in
[%expect {| |}];
let (_ : bool) = Re.execp any ~pos:1 ~len:3 "foo" in
[%expect.unreachable]
[@@expect.uncaught_exn {| (Invalid_argument "Re.exec: out of bounds") |}]
;;