Implement most of the spec reusing scribe & nefthera code

This commit is contained in:
Juno Takano 2025-04-09 01:59:32 -03:00
commit 612a98cfde
16 changed files with 225 additions and 25 deletions

View file

@ -0,0 +1,15 @@
module Reader = Tori.System.Process.Reader
module File = Tori.System.File
let smoke () =
(* Executing echo should return the same string on output *)
let result = Reader.read [||] "echo 0x70121" in
assert (Reader.format result = "0x70121");
(* Reading a file, relying on Dune's directory structure *)
let file_contents = File.read "../tori.opam" in
let contents_list = String.split_on_char '\n' file_contents in
assert (List.mem "depends: [" contents_list)
let () = smoke ()