File tree Expand file tree Collapse file tree 4 files changed +9
-6
lines changed
Expand file tree Collapse file tree 4 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ depends: [
2020 "lwt" {>= "4.0.0"}
2121 "optint" {>= "0.2.0"}
2222 "ptime" {>= "1.0.0"}
23- "alcotest" {with-test}
23+ "alcotest" {with-test & >= "0.8.1" }
2424]
2525synopsis: "MirageOS signatures for key/value devices"
2626description: """
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ module Key = struct
2222 (* Store the path as a reverse list to optimise basename and (/)
2323 operations *)
2424
25- let err_invalid_segment x = Fmt. failwith " %S is not a valid segment" x
25+ let err_invalid_segment x = Fmt. kstr invalid_arg " %S is not a valid segment" x
2626
2727 let check_segment x =
2828 String. iter (function '/' -> err_invalid_segment x | _ -> () ) x;
Original file line number Diff line number Diff line change @@ -43,11 +43,14 @@ module Key: sig
4343 equal. *)
4444
4545 val add : t -> string -> t
46- (* * [add t s] is the concatenated key [t/s]. Raise
47- [Invalid_argument] if [s] contains ["/"]. *)
46+ (* * [add t s] is the concatenated key [t/s].
47+
48+ @raise Invalid_argument if [s] contains ['/']. *)
4849
4950 val ( / ) : t -> string -> t
50- (* * [t / x] is [add t x]. *)
51+ (* * [t / x] is [add t x].
52+
53+ @raise Invalid_argument if [s] contains ['/']. *)
5154
5255 val append : t -> t -> t
5356 (* * [append x y] is the concatenated key [x/y]. *)
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ let path_add () =
2222 try
2323 let _ = Key. (v p / b) in
2424 Alcotest. failf " %s is not a valid segment, should fail" b
25- with Failure _ -> ()
25+ with Invalid_argument _ -> ()
2626 in
2727 check " " " bar" " /bar" ;
2828 check " /" " foo" " /foo" ;
You can’t perform that action at this time.
0 commit comments