Module Crs_cli_test.Tests_helpers

val parse_file : path:Volgo.Vcs.Path_in_repo.t -> file_contents:Base.string -> Cr_comment.t Base.list

In the tests we want to avoid test CRs to be mistaken for actual CRs, thus we perform some dynamic string substitutions. Test CRs are prefixed by the '$' symbol. For example:

  (* $CR user1 for user2: This is a test CR. *)

parse_file ~path ~file_contents first removes the '$' prefixes, and then parse the contents using the regular code path to extract CRs from file.

The provided path is not accessed on disk, we simply use it to build locations for the resulting CRs. The contents is solely read from file_contents.

val test_cases : Base.string

A shared list of common cases for CRs. This is used by several tests as a basis for making sure to handle various kinds of CRs.