summaryrefslogtreecommitdiff
path: root/ocamltest/filecompare.mli
blob: c7d8ff6b1ad3200501912620d0b7122c26f54a94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
(**************************************************************************)
(*                                                                        *)
(*                                 OCaml                                  *)
(*                                                                        *)
(*             Sebastien Hinderer, projet Gallium, INRIA Paris            *)
(*                                                                        *)
(*   Copyright 2016 Institut National de Recherche en Informatique et     *)
(*     en Automatique.                                                    *)
(*                                                                        *)
(*   All rights reserved.  This file is distributed under the terms of    *)
(*   the GNU Lesser General Public License version 2.1, with the          *)
(*   special exception on linking described in the file LICENSE.          *)
(*                                                                        *)
(**************************************************************************)

(* File comparison tools *)

type result =
  | Same
  | Different
  | Unexpected_output
  | Error of string * int

type tool

val make_cmp_tool : int -> tool

val make_comparison_tool :
  ?result_of_exitcode:(string -> int -> result) -> string -> string -> tool

val default_comparison_tool : tool

type filetype = Binary | Text

type files = {
  filetype : filetype;
  reference_filename : string;
  output_filename : string;
}

val compare_files : ?tool:tool -> files -> result

val check_file : ?tool:tool -> files -> result

val cmp_result_of_exitcode : string -> int -> result

val diff : files -> (string, string) Pervasives.result