diff --git a/dune-project b/dune-project index f63ebd6..428891d 100644 --- a/dune-project +++ b/dune-project @@ -1,4 +1,5 @@ (lang dune 3.9) +(cram enable) (name stringCodepointSplitter) (version 0.0.1) diff --git a/test/dune b/test/dune index abafc95..0caa2b6 100644 --- a/test/dune +++ b/test/dune @@ -1,2 +1,6 @@ -(test - (name stringCodepointSplitter)) +(executable + (libraries stringCodepointSplitter) + (name stringCodepointSplitterTest)) + +(cram + (deps ./stringCodepointSplitterTest.exe)) diff --git a/test/stringCodepointSplitter.ml b/test/stringCodepointSplitter.ml deleted file mode 100644 index e69de29..0000000 diff --git a/test/stringCodepointSplitter.t b/test/stringCodepointSplitter.t new file mode 100644 index 0000000..f50da59 --- /dev/null +++ b/test/stringCodepointSplitter.t @@ -0,0 +1,11 @@ +ASCII only + $ ./stringCodepointSplitterTest.exe abc + a + b + c + +Still simple but not just ASCII + $ ./stringCodepointSplitterTest.exe «—» + « + — + » diff --git a/test/stringCodepointSplitterTest.ml b/test/stringCodepointSplitterTest.ml new file mode 100644 index 0000000..76105fe --- /dev/null +++ b/test/stringCodepointSplitterTest.ml @@ -0,0 +1,4 @@ +let () = + Sys.argv.(1) + |> StringCodepointSplitter.split_string_by_unicode_codepoint + |> List.iter print_endline