Test.PatchPatching text and files.
This is used by snapshot testing, see Substitutions. Normally you don't need to use that.
type subst = {first : int;First byte of range to replace.
*)last : int;Last byte of range to replace.
*)subst : string;The data substituted in the range.
*)}The type for text substitutions.
val make : src:string -> tmake ~src is an empty patch on source text src.
val is_empty : t -> boolis_empty p is true iff p has no substitutions.
val src : t -> stringsrc p is the source text to patch.
val apply : t -> stringapply p is the text resulting from applying the substition of p to src p.
val get : B0_std.Fpath.t -> t optionget file is the patch for file file. This is None only if file did not exist, in which case an error messages has been logged. The first time you lookup file you get an empty patch.
val update : B0_std.Fpath.t -> t -> unitupdate file p updates the patch of file file to p.
write_files () writes the patched files. Note. if you are using Test.main, this is done automatically.
val src_root : unit -> B0_std.Fpath.t optionsrc_root () if present it prefixed to Test.loc path with Fpath.append for looking up files.