Adding tests to make sure things work
This commit is contained in:
parent
c6f2883bf9
commit
1a4afd5d41
5 changed files with 22 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
||||||
(lang dune 3.9)
|
(lang dune 3.9)
|
||||||
|
(cram enable)
|
||||||
|
|
||||||
(name stringCodepointSplitter)
|
(name stringCodepointSplitter)
|
||||||
(version 0.0.1)
|
(version 0.0.1)
|
||||||
|
|
|
@ -1,2 +1,6 @@
|
||||||
(test
|
(executable
|
||||||
(name stringCodepointSplitter))
|
(libraries stringCodepointSplitter)
|
||||||
|
(name stringCodepointSplitterTest))
|
||||||
|
|
||||||
|
(cram
|
||||||
|
(deps ./stringCodepointSplitterTest.exe))
|
||||||
|
|
11
test/stringCodepointSplitter.t
Normal file
11
test/stringCodepointSplitter.t
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
ASCII only
|
||||||
|
$ ./stringCodepointSplitterTest.exe abc
|
||||||
|
a
|
||||||
|
b
|
||||||
|
c
|
||||||
|
|
||||||
|
Still simple but not just ASCII
|
||||||
|
$ ./stringCodepointSplitterTest.exe «—»
|
||||||
|
«
|
||||||
|
—
|
||||||
|
»
|
4
test/stringCodepointSplitterTest.ml
Normal file
4
test/stringCodepointSplitterTest.ml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
let () =
|
||||||
|
Sys.argv.(1)
|
||||||
|
|> StringCodepointSplitter.split_string_by_unicode_codepoint
|
||||||
|
|> List.iter print_endline
|
Loading…
Reference in a new issue