Skip to content

Commit 140deeb

Browse files
authored
test(str): incorrect group specification (#567)
1 parent 912e8ab commit 140deeb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib_test/expect/test_str.ml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,12 @@ let%expect_test "match semantics" =
240240

241241
let%expect_test "Group (or submatch)" =
242242
eq_match "\\(a\\)\\(a\\)?\\(b\\)" "ab";
243-
[%expect {| |}]
243+
[%expect {| |}];
244+
eq_match "\\(foo" "foo";
245+
[%expect {|
246+
str: (Error "Failure(\"\\\\( group not closed by \\\\)\")")
247+
re: (Error Re_private.Emacs.Parse_error)
248+
|}]
244249
;;
245250

246251
let%expect_test "Character set" =

0 commit comments

Comments
 (0)