This commit is contained in:
parent
aa2ff7b2f0
commit
2f3113f55d
11742 changed files with 1223940 additions and 0 deletions
13
unikernel/duniverse/ocaml-re/lib_test/expect/test_iter.ml
Normal file
13
unikernel/duniverse/ocaml-re/lib_test/expect/test_iter.ml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
open Import
|
||||
|
||||
let%expect_test "iter" =
|
||||
let re = Re.Posix.compile_pat "(ab)+" in
|
||||
strings (Re.matches re "aabab aaabba dab ");
|
||||
[%expect {| ["abab"; "ab"; "ab"] |}];
|
||||
strings (Re.matches ~pos:2 ~len:7 re "abab ababab");
|
||||
[%expect {| ["ab"; "abab"] |}];
|
||||
strings (Re.matches re_empty "ab");
|
||||
[%expect {| [""; ""; ""] |}];
|
||||
strings (Re.matches (Re.compile (Re.rep (Re.char 'a'))) "cat");
|
||||
[%expect {| [""; "a"; ""] |}]
|
||||
;;
|
||||
Loading…
Add table
Add a link
Reference in a new issue