package ppx_expect

  1. Overview
  2. Docs
Cram like framework for OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

v0.13.1.tar.gz
sha256=4d19571d7dcef21de581cc477177fd29722f2724a925c36a763fe98fa31f22e1
md5=8f6fd9c0c3c93f9e5a25038f1c26b0aa

doc/ppx_expect.matcher/Expect_test_matcher/Cst/Line/index.html

Module Cst.Line

type 'a not_blank = {
  1. trailing_blanks : Base.string;
    (*

    regexp: " \t*"

    *)
  2. orig : Base.string;
    (*

    regexp: "^\n*^ \t\n"

    *)
  3. data : 'a;
}
val sexp_of_not_blank : ('a -> Ppx_sexp_conv_lib.Sexp.t) -> 'a not_blank -> Ppx_sexp_conv_lib.Sexp.t
val compare_not_blank : ('a -> 'a -> Base.int) -> 'a not_blank -> 'a not_blank -> Base.int
type 'a t =
  1. | Blank of Base.string
    (*

    regexp: " \t*"

    *)
  2. | Not_blank of 'a not_blank
val sexp_of_t : ('a -> Ppx_sexp_conv_lib.Sexp.t) -> 'a t -> Ppx_sexp_conv_lib.Sexp.t
val compare : ('a -> 'a -> Base.int) -> 'a t -> 'a t -> Base.int
val invariant : ('a -> Base.unit) -> 'a t -> Base.unit
val map : 'a t -> f:(Base.string -> 'a -> 'b) -> 'b t

The callback receive the orig and data fields

val strip : 'a t -> 'a t

Delete trailing blanks (everything for blank lines)

val data : 'a t -> blank:'a -> 'a
OCaml

Innovation. Community. Security.