diff --git a/CHANGES.md b/CHANGES.md index d2707793c4..24f520a10e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -12,6 +12,7 @@ undefined - vim: load the plugin when necessary if it wasn’t loaded before (#1511) + test suite - add tests for constructors' documentation (#1511) + - add test cases for label comment documentation (#1526, @mheiber) merlin 4.6 ========== diff --git a/tests/test-dirs/document/label-comments.t b/tests/test-dirs/document/label-comments.t new file mode 100644 index 0000000000..7b07a527f3 --- /dev/null +++ b/tests/test-dirs/document/label-comments.t @@ -0,0 +1,66 @@ +Examples adapted from https://v2.ocaml.org/manual/doccomments.html#ss:label-comments. +We do not currently show these comments: + + $ cat >main.ml < type t1 = + > lbl_a:unit (** lbl_a comment *) -> + > lbl_b:unit (** lbl_b comment *) -> unit + > let _test (f: t1) = + > let _ = f ~lbl_a:() ~lbl_b:() in + > () + > EOF + +FIXME: expected "lbl_b comment" + + $ $MERLIN single document -position 5:15 \ + > -filename main.ml main.ml < type t = < + > meth_a: unit; (** meth_a comment *) + > meth_b: unit; (** meth_b comment *) + > > + > let _test (o: t3) = + > o#meth_b + > EOF + +FIXME: expected "meth_b comment" + + $ $MERLIN single document -position 6:6 \ + > -filename main.ml main.ml <<"EOF" + > type t = [ + > | `Poly_a (** Poly_a comment *) + > | `Poly_b (** Poly_b comment *) + > ] + > let _: t4 = + > `Poly_b + > EOF + +FIXME: expected "Poly_b comment" + + $ $MERLIN single document -position 6:4 \ + > -filename main.ml main.ml < type t2 = { + > fld_a: unit; (** fld_a comment *) + > fld_b: unit; (** fld_b comment *) + > fld_c: unit; + > } + > let _ = { + > fld_a = (); + > fld_b = (); + > fld_c = () + > } + > EOF + + $ $MERLIN single document -position 8:4 \ + > -filename main.ml