Adding tests to make sure things work

This commit is contained in:
Raphaël Proust 2023-08-29 15:38:23 +02:00
parent c6f2883bf9
commit 1a4afd5d41
5 changed files with 22 additions and 2 deletions

View file

@ -1,4 +1,5 @@
(lang dune 3.9)
(cram enable)
(name stringCodepointSplitter)
(version 0.0.1)

View file

@ -1,2 +1,6 @@
(test
(name stringCodepointSplitter))
(executable
(libraries stringCodepointSplitter)
(name stringCodepointSplitterTest))
(cram
(deps ./stringCodepointSplitterTest.exe))

View file

@ -0,0 +1,11 @@
ASCII only
$ ./stringCodepointSplitterTest.exe abc
a
b
c
Still simple but not just ASCII
$ ./stringCodepointSplitterTest.exe «»
«
»

View file

@ -0,0 +1,4 @@
let () =
Sys.argv.(1)
|> StringCodepointSplitter.split_string_by_unicode_codepoint
|> List.iter print_endline