package patdiff
Install
Dune Dependency
Authors
Maintainers
Sources
md5=ed1fd8166e2e99774432c1e28515f37e
sha512=7833f95ce42eeb17ecbef514eab13a37a0ab125b3c6e7e8af09c5b0efa3be6b971c6c4a40f3d809f1c254c8bc720ddaa46b54ff0514ddb9db0f5be03d99f5fd0
doc/patdiff.expect_test_patdiff/Expect_test_patdiff/index.html
Module Expect_test_patdiff
Source
val patdiff :
?location_style:Patdiff_kernel.Format.Location_style.t ->
?context:int ->
?keep_ws:bool ->
string ->
string ->
string
Runs the patdiff algorithm on its inputs to compute the diff to go from the first string to the second string. Produces a multi-line ASCII diff. If specified, ~context
overrides the default number of lines of context for each hunk. keep_ws
overrides the default behavior for whether to consider whitespace in diffs.
val patdiff_s :
?location_style:Patdiff_kernel.Format.Location_style.t ->
?context:int ->
?keep_ws:bool ->
Core.Sexp.t ->
Core.Sexp.t ->
string
Like patdiff
, but for s-expressions. Formats the s-expressions the same way as print_s
from Expect_test_helpers_base
, then calls patdiff
.
val print_patdiff :
?location_style:Patdiff_kernel.Format.Location_style.t ->
?context:int ->
?keep_ws:bool ->
string ->
string ->
unit
Like patdiff
, but prints the result to stdout.
val print_patdiff_s :
?location_style:Patdiff_kernel.Format.Location_style.t ->
?context:int ->
?keep_ws:bool ->
Core.Sexp.t ->
Core.Sexp.t ->
unit
Like patdiff_s
, but prints the result to stdout.
val diff_printer :
?location_style:Patdiff_kernel.Format.Location_style.t ->
?context:int ->
?keep_ws:bool ->
string option ->
(string -> unit) Core.Staged.t
Produces a stateful function that prints the diff between the previous string and the current one.
Prints the entirety of the first string it is given, whether that is via the string option
argument before unstaging, or via the callback. If the initial string is Some x
: Prints the entirety of x
immediately. If the initial string is None
: Prints the entirety of the first string passed to the callback.
val diff_printer_s :
?location_style:Patdiff_kernel.Format.Location_style.t ->
?context:int ->
?keep_ws:bool ->
Core.Sexp.t option ->
(Core.Sexp.t -> unit) Core.Staged.t
Like diff_printer
, but for s-expressions. Formats the s-expressions the same way as print_s
from Expect_test_helpers_base
, then calls diff_printer
.
Prints the entirety of the first sexp it is given, whether that is via the sexp option
argument before unstaging, or via the callback. If the initial sexp is Some x
: Prints the entirety of x
immediately. If the initial sexp is None
: Prints the entirety of the first sexp passed to the callback.