Skip to content

Commit

Permalink
test(str): include more cases (#564)
Browse files Browse the repository at this point in the history
  • Loading branch information
rgrinberg authored Oct 28, 2024
1 parent a35c1dc commit e2308be
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib_test/str/test_str.ml
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,16 @@ let _ =
eq_match "[0-9]+" "a";
eq_match "[9-0]+" "2";
eq_match "[5-5]" "5";
eq_match "[5-4]" "1");
eq_match "[5-4]" "1";
eq_match' "[]]" "]";
eq_match' "[a-]" "-";
eq_match' "[-a]" "-";
eq_match' "]" "]";
eq_match' "[^b-f]" "z";
eq_match' "[^b-f]" "a"
(* These errors aren't correct *)
(* eq_match' "[]" "x" *)
(* eq_match' "[" "[" *));
expect_pass "compl" (fun () ->
eq_match "[^0-9a-z]+" "A:Z+";
eq_match "[^0-9a-z]+" "0";
Expand Down

0 comments on commit e2308be

Please sign in to comment.