Something went wrong. Try again.
A local Git merge queue with content-bound gate verdicts
Something went wrong. Try again.
935 B · 25 lines
OCaml
at main
1234567891011121314151617181920212223242526(* mq pull in a repository mq init has not run in: refused, next: mq init (doc/commands.md, -C PATH), with nothing written; its other cases are cram/machines.t. *)
open Merge_queue_eiomodule M = Merge_queue
let test_no_rules () = Fixture.with_dir @@ fun env root -> Fixture.init env root; ignore (Fixture.commit env ~dir:root [ ("README", "one\n") ] "one"); let before = Fixture.git env ~dir:root [ "for-each-ref" ] in match Command_pull.run (Fixture.context env root) ~remote:None with | Error o -> Alcotest.(check string) "the line" "refused: mq init has not run in this repository" (M.Outcome.first_line o); Alcotest.(check string) "nothing written" before (Fixture.git env ~dir:root [ "for-each-ref" ]) | Ok r -> Alcotest.failf "reported %a" M.Report.pp r
let suite = ( "command_pull", [ Alcotest.test_case "refused before mq init" `Quick test_no_rules ] )