Skip to content

Commit

Permalink
test: write test to distinguish all colors (#518)
Browse files Browse the repository at this point in the history
  • Loading branch information
rgrinberg authored Oct 3, 2024
1 parent 5586c57 commit 6b13267
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib_test/expect/test_color.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
open Import

let all_chars = String.init 256 Char.chr

let%expect_test "match an re that distinguishes every single char" =
let re =
let open Re in
set all_chars |> whole_string |> compile
in
for i = 0 to String.length all_chars - 1 do
assert (Re.execp re (String.make 1 all_chars.[i]))
done
;;

0 comments on commit 6b13267

Please sign in to comment.