From e82a43ef2bc629712358c08a0454a22e6254abe4 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Sun, 27 Oct 2024 21:47:17 +0000 Subject: [PATCH] test(str): include more cases --- lib_test/str/test_str.ml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib_test/str/test_str.ml b/lib_test/str/test_str.ml index 70b7b95..3700fd0 100644 --- a/lib_test/str/test_str.ml +++ b/lib_test/str/test_str.ml @@ -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";