···11(** Tests for [Irmin_cbor].
2233 Spec:
44- - CBOR maps whose keys are text strings become [Named] children. Values
55- are re-encoded as CBOR bytes and stored [`Inline].
44+ - CBOR maps whose keys are text strings become [Named] children. Values are
55+ re-encoded as CBOR bytes and stored [`Inline].
66 - CBOR arrays become [Indexed] children. Elements are re-encoded as CBOR
77 bytes.
88 - Non-text-keyed map entries are dropped silently.
···4040 match c with
4141 | `Inline _ -> ()
4242 | `Link _ ->
4343- Alcotest.failf
4444- "parse_map: child %s should be Inline, not Link" n)
4343+ Alcotest.failf "parse_map: child %s should be Inline, not Link" n)
4544 kids
4645 | _ -> Alcotest.fail "parse_map: expected Named"
4746···5352 (fun i c ->
5453 match c with
5554 | `Inline _ -> ()
5656- | `Link _ ->
5757- Alcotest.failf "parse_array: index %d should be Inline" i)
5555+ | `Link _ -> Alcotest.failf "parse_array: index %d should be Inline" i)
5856 arr
5957 | _ -> Alcotest.fail "parse_array: expected Indexed"
6058···6361 match Irmin_cbor.parse sample_mixed_keys with
6462 | Irmin.SHA256.Named [ ("text", _) ] -> ()
6563 | Irmin.SHA256.Named kids ->
6666- Alcotest.failf "expected single text-keyed child, got %d" (List.length kids)
6464+ Alcotest.failf "expected single text-keyed child, got %d"
6565+ (List.length kids)
6766 | _ -> Alcotest.fail "parse_drops_non_text_keys"
68676968let parse_invalid_is_empty () =
···102101 parse_array_length_and_shape;
103102 Alcotest.test_case "parse drops non-text keys" `Quick
104103 parse_drops_non_text_keys;
105105- Alcotest.test_case "parse invalid -> Named []" `Quick parse_invalid_is_empty;
104104+ Alcotest.test_case "parse invalid -> Named []" `Quick
105105+ parse_invalid_is_empty;
106106 Alcotest.test_case "parse scalar -> Named []" `Quick parse_scalar_is_empty;
107107 Alcotest.test_case "roundtrip preserves member names" `Quick
108108 roundtrip_map_shape_preserved;
+8-12
test/json/test_irmin_json.ml
···2233 Spec:
44 - [parse] maps JSON objects to [Named] members (name + inline value bytes),
55- arrays to [Indexed] children (inline value bytes), and everything else
66- to an empty [Named].
55+ arrays to [Indexed] children (inline value bytes), and everything else to
66+ an empty [Named].
77 - [serialize] is the inverse on valid shapes: [parse (serialize c)] must
88 equal [c] for any [c] produced by [parse]. Round-tripping is the primary
99 correctness property.
1010- - [schema] is recursive: every navigable child is also a JSON codec. Name
1111- is ["application/json"]. *)
1010+ - [schema] is recursive: every navigable child is also a JSON codec. Name is
1111+ ["application/json"]. *)
12121313let child_pp fmt = function
1414 | `Inline s -> Fmt.pf fmt "Inline %S" s
···2323let children_pp fmt = function
2424 | Irmin.SHA256.Named ms ->
2525 Fmt.pf fmt "Named [%a]"
2626- (Fmt.list ~sep:Fmt.comma
2727- (fun fmt (n, c) -> Fmt.pf fmt "%s -> %a" n child_pp c))
2626+ (Fmt.list ~sep:Fmt.comma (fun fmt (n, c) ->
2727+ Fmt.pf fmt "%s -> %a" n child_pp c))
2828 ms
2929 | Irmin.SHA256.Indexed arr ->
3030- Fmt.pf fmt "Indexed [|%a|]"
3131- (Fmt.array ~sep:Fmt.comma child_pp)
3232- arr
3030+ Fmt.pf fmt "Indexed [|%a|]" (Fmt.array ~sep:Fmt.comma child_pp) arr
33313432let children_equal a b =
3533 match (a, b) with
···85838684let roundtrip_object () =
8785 (* The key property: [parse (serialize c) = c]. *)
8888- let c =
8989- Irmin.SHA256.Named [ ("k", `Inline "\"v\""); ("n", `Inline "7") ]
9090- in
8686+ let c = Irmin.SHA256.Named [ ("k", `Inline "\"v\""); ("n", `Inline "7") ] in
9187 Alcotest.check children "parse . serialize = id" c
9288 (Irmin_json.parse (Irmin_json.serialize c))
9389
+6-7
test/mime/test_irmin_mime.ml
···44 - Each exported MIME constant matches the IANA/OCI string that codecs and
55 [Magic_mime.lookup] agree on.
66 - [rules ()] returns the canonical codec-dispatch list in a stable order
77- (same call => same list). Must include at least one rule per declared
88- MIME (json/yaml/toml/cbor/tar/oci/text) plus gzip-wrapped patterns. *)
77+ (same call => same list). Must include at least one rule per declared MIME
88+ (json/yaml/toml/cbor/tar/oci/text) plus gzip-wrapped patterns. *)
991010-let check_mime name expected actual = Alcotest.(check string) name expected actual
1010+let check_mime name expected actual =
1111+ Alcotest.(check string) name expected actual
11121213let mime_strings () =
1314 check_mime "json" "application/json" Irmin_mime.json;
···2526let rules_count_is_stable () =
2627 let a = Irmin_mime.rules () in
2728 let b = Irmin_mime.rules () in
2828- Alcotest.(check int) "same count on each call" (List.length a)
2929- (List.length b)
2929+ Alcotest.(check int) "same count on each call" (List.length a) (List.length b)
30303131let rules_include_all_declared_mimes () =
3232 let n = List.length (Irmin_mime.rules ()) in
···3939 ( "irmin_mime",
4040 [
4141 Alcotest.test_case "MIME constants match spec" `Quick mime_strings;
4242- Alcotest.test_case "rules () count is stable" `Quick
4343- rules_count_is_stable;
4242+ Alcotest.test_case "rules () count is stable" `Quick rules_count_is_stable;
4443 Alcotest.test_case "rules include all built-in codecs" `Quick
4544 rules_include_all_declared_mimes;
4645 ] )
+3-4
test/oci/test_irmin_oci.ml
···11(** Tests for [Irmin_oci].
2233 Spec:
44- - An OCI manifest (JSON object) parses to [Named] with one child per
55- member. Values are re-serialized JSON kept [`Inline].
44+ - An OCI manifest (JSON object) parses to [Named] with one child per member.
55+ Values are re-serialized JSON kept [`Inline].
66 - A top-level array parses to [Indexed].
77 - Invalid / non-structural JSON parses to [Named []].
88 - Roundtrip: [parse (serialize c)] preserves member names. *)
···2828 (fun (n, c) ->
2929 match c with
3030 | `Inline _ -> ()
3131- | `Link _ ->
3232- Alcotest.failf "member %s should be Inline, not Link" n)
3131+ | `Link _ -> Alcotest.failf "member %s should be Inline, not Link" n)
3332 kids
3433 | _ -> Alcotest.fail "not Named"
3534
+5-4
test/text/test_irmin_text.ml
···55 - [markdown] is a leaf codec named ["text/markdown"] with a line-level
66 merge.
77 - Both declare their MIME (so [Irmin.Schema.mime_rules] can pick them up).
88- - Merge: non-overlapping edits on different lines compose cleanly;
99- identical edits are a no-op; conflicting edits yield a [`Conflict]. *)
88+ - Merge: non-overlapping edits on different lines compose cleanly; identical
99+ edits are a no-op; conflicting edits yield a [`Conflict]. *)
10101111let name_and_mime codec expected_name =
1212- Alcotest.(check string) (Fmt.str "%s name" expected_name) expected_name
1313- (Irmin.SHA256.name codec);
1212+ Alcotest.(check string)
1313+ (Fmt.str "%s name" expected_name)
1414+ expected_name (Irmin.SHA256.name codec);
1415 Alcotest.(check (option string))
1516 (Fmt.str "%s mime" expected_name)
1617 (Some expected_name) (Irmin.SHA256.mime codec)
+10-6
test/ui/test_brand.ml
···33 Spec:
44 - [logo] is a single anchor pointing at the site root ([href="/"]) and
55 contains the Irmin wordmark SVG.
66- - The SVG carries an accessible label (["Irmin"]) so screen readers
77- announce it. *)
66+ - The SVG carries an accessible label (["Irmin"]) so screen readers announce
77+ it. *)
8899let logo_is_a_single_anchor () =
1010 let s = Tw_html.to_string Brand.logo in
1111- Alcotest.(check bool) "starts with <a" true
1111+ Alcotest.(check bool)
1212+ "starts with <a" true
1213 (Astring.String.is_prefix ~affix:"<a " s);
1313- Alcotest.(check bool) "ends with </a>" true
1414+ Alcotest.(check bool)
1515+ "ends with </a>" true
1416 (Astring.String.is_suffix ~affix:"</a>" s)
15171618let logo_links_to_root () =
1719 let s = Tw_html.to_string Brand.logo in
1818- Alcotest.(check bool) "href=\"/\"" true
2020+ Alcotest.(check bool)
2121+ "href=\"/\"" true
1922 (Astring.String.is_infix ~affix:"href=\"/\"" s)
20232124let logo_embeds_accessible_svg () =
2225 let s = Tw_html.to_string Brand.logo in
2326 Alcotest.(check bool) "<svg" true (Astring.String.is_infix ~affix:"<svg" s);
2424- Alcotest.(check bool) "aria-label=\"Irmin\"" true
2727+ Alcotest.(check bool)
2828+ "aria-label=\"Irmin\"" true
2529 (Astring.String.is_infix ~affix:"aria-label=\"Irmin\"" s)
26302731let suite =
+12-10
test/ui/test_breadcrumb.ml
···2233 Spec:
44 - Each [(label, href)] segment renders as a clickable anchor. The final
55- segment is also clickable (per [breadcrumb.mli]), so N segments produce
66- N anchors.
55+ segment is also clickable (per [breadcrumb.mli]), so N segments produce N
66+ anchors.
77 - Labels are visible as text content.
88 - Hrefs are emitted verbatim. *)
99···2020let anchor_count_matches_segments () =
2121 let bc =
2222 Breadcrumb.v
2323- ~segments:
2424- [ ("home", "/"); ("repo", "/repo/"); ("branch", "/repo/main/") ]
2323+ ~segments:[ ("home", "/"); ("repo", "/repo/"); ("branch", "/repo/main/") ]
2524 in
2625 let s = Tw_html.to_string bc in
2726 Alcotest.(check int) "three anchors" 3 (count_substring ~needle:"<a" s)
···2928let all_labels_visible () =
3029 let bc = Breadcrumb.v ~segments:[ ("alpha", "/a"); ("beta", "/b") ] in
3130 let s = Tw_html.to_string bc in
3232- Alcotest.(check bool) "alpha label present" true
3131+ Alcotest.(check bool)
3232+ "alpha label present" true
3333 (Astring.String.is_infix ~affix:">alpha<" s);
3434- Alcotest.(check bool) "beta label present" true
3434+ Alcotest.(check bool)
3535+ "beta label present" true
3536 (Astring.String.is_infix ~affix:">beta<" s)
36373738let hrefs_are_emitted_verbatim () =
3839 let bc = Breadcrumb.v ~segments:[ ("x", "/x/"); ("y", "/x/y/") ] in
3940 let s = Tw_html.to_string bc in
4040- Alcotest.(check bool) "/x/" true
4141+ Alcotest.(check bool)
4242+ "/x/" true
4143 (Astring.String.is_infix ~affix:"href=\"/x/\"" s);
4242- Alcotest.(check bool) "/x/y/" true
4444+ Alcotest.(check bool)
4545+ "/x/y/" true
4346 (Astring.String.is_infix ~affix:"href=\"/x/y/\"" s)
44474548let empty_has_no_anchors () =
···5659 all_labels_visible;
5760 Alcotest.test_case "hrefs emitted verbatim" `Quick
5861 hrefs_are_emitted_verbatim;
5959- Alcotest.test_case "no segments -> no anchors" `Quick
6060- empty_has_no_anchors;
6262+ Alcotest.test_case "no segments -> no anchors" `Quick empty_has_no_anchors;
6163 ] )
62646365let () = Alcotest.run "Breadcrumb" [ suite ]
+15-9
test/ui/test_button.ml
···2233 Spec:
44 - [primary] / [secondary] render a [<button>] element containing their
55- children. The primary variant visually uses the brand colour; secondary
66- is outlined neutral. At minimum both are clickable buttons with the
77- label text visible.
55+ children. The primary variant visually uses the brand colour; secondary is
66+ outlined neutral. At minimum both are clickable buttons with the label
77+ text visible.
88 - [link_primary] renders an [<a>] element (so callers supply an href),
99 styled like the primary button. *)
10101111let button_renders_children () =
1212 let s = Tw_html.to_string (Button.primary [ Tw_html.txt "Save" ]) in
1313- Alcotest.(check bool) "<button" true
1313+ Alcotest.(check bool)
1414+ "<button" true
1415 (Astring.String.is_infix ~affix:"<button" s);
1515- Alcotest.(check bool) "label text" true
1616+ Alcotest.(check bool)
1717+ "label text" true
1618 (Astring.String.is_infix ~affix:"Save" s)
17191820let secondary_renders_button_tag () =
1921 let s = Tw_html.to_string (Button.secondary [ Tw_html.txt "Cancel" ]) in
2020- Alcotest.(check bool) "<button" true
2222+ Alcotest.(check bool)
2323+ "<button" true
2124 (Astring.String.is_infix ~affix:"<button" s);
2222- Alcotest.(check bool) "label text" true
2525+ Alcotest.(check bool)
2626+ "label text" true
2327 (Astring.String.is_infix ~affix:"Cancel" s)
24282529let link_primary_renders_anchor () =
···3034 [ Tw_html.txt "Sign in" ])
3135 in
3236 Alcotest.(check bool) "<a" true (Astring.String.is_infix ~affix:"<a" s);
3333- Alcotest.(check bool) "href=/signin" true
3737+ Alcotest.(check bool)
3838+ "href=/signin" true
3439 (Astring.String.is_infix ~affix:"href=\"/signin\"" s);
3535- Alcotest.(check bool) "label text" true
4040+ Alcotest.(check bool)
4141+ "label text" true
3642 (Astring.String.is_infix ~affix:"Sign in" s)
37433844let primary_and_secondary_are_visually_distinct () =
+20-13
test/ui/test_drop_zone.ml
···2233 Spec:
44 - Renders a [<form>] with:
55- - [action] equal to [upload_url]
66- - [method="POST"]
77- - [enctype="multipart/form-data"]
55+ - [action] equal to [upload_url]
66+ - [method="POST"]
77+ - [enctype="multipart/form-data"]
88 - Carries a hidden [<input>] named [dir] whose value is [target_dir].
99 - Exposes a [<input type="file">] for selecting files.
1010 - The file input auto-submits the form on change (so no JS framework is
···15151616let form_post_action_enctype () =
1717 let s = form ~upload_url:"/branch/upload" ~target_dir:"sub" in
1818- Alcotest.(check bool) "<form" true
1919- (Astring.String.is_infix ~affix:"<form" s);
2020- Alcotest.(check bool) "action" true
1818+ Alcotest.(check bool) "<form" true (Astring.String.is_infix ~affix:"<form" s);
1919+ Alcotest.(check bool)
2020+ "action" true
2121 (Astring.String.is_infix ~affix:"action=\"/branch/upload\"" s);
2222- Alcotest.(check bool) "POST" true
2222+ Alcotest.(check bool)
2323+ "POST" true
2324 (Astring.String.is_infix ~affix:"method=\"POST\"" s);
2424- Alcotest.(check bool) "multipart" true
2525+ Alcotest.(check bool)
2626+ "multipart" true
2527 (Astring.String.is_infix ~affix:"enctype=\"multipart/form-data\"" s)
26282729let hidden_dir_carries_target () =
2830 let s = form ~upload_url:"/u" ~target_dir:"docs/src" in
2929- Alcotest.(check bool) "hidden dir input" true
3131+ Alcotest.(check bool)
3232+ "hidden dir input" true
3033 (Astring.String.is_infix ~affix:"type=\"hidden\"" s);
3131- Alcotest.(check bool) "name=dir" true
3434+ Alcotest.(check bool)
3535+ "name=dir" true
3236 (Astring.String.is_infix ~affix:"name=\"dir\"" s);
3333- Alcotest.(check bool) "value=target" true
3737+ Alcotest.(check bool)
3838+ "value=target" true
3439 (Astring.String.is_infix ~affix:"value=\"docs/src\"" s)
35403641let file_input_present_with_auto_submit () =
3742 let s = form ~upload_url:"/u" ~target_dir:"" in
3838- Alcotest.(check bool) "file input" true
4343+ Alcotest.(check bool)
4444+ "file input" true
3945 (Astring.String.is_infix ~affix:"type=\"file\"" s);
4040- Alcotest.(check bool) "auto-submit on change" true
4646+ Alcotest.(check bool)
4747+ "auto-submit on change" true
4148 (Astring.String.is_infix ~affix:"dispatchEvent" s)
42494350let suite =
+31-25
test/ui/test_layout.ml
···33 Spec:
44 - [page ~title ~auth content] produces a [Tw_html.page] whose HTML
55 rendering:
66- - has a [<title>] matching [title];
77- - contains the content elements;
88- - renders auth controls per [auth]:
99- * [Off]: no sign-in button, no avatar;
1010- * [Anon]: a "Sign in with GitHub" control, no avatar;
1111- * [Signed_in {email; name; ...}]: displays the user's name (or
1212- email fallback when name is empty) and a sign-out form.
66+ - has a [<title>] matching [title];
77+ - contains the content elements;
88+ - renders auth controls per [auth]: * [Off]: no sign-in button, no avatar; *
99+ [Anon]: a "Sign in with GitHub" control, no avatar; *
1010+ [Signed_in {email; name; ...}]: displays the user's name (or email
1111+ fallback when name is empty) and a sign-out form.
1312 - [title_h1 text] renders an [<h1>] containing [text].
1413 - [summary text] renders a paragraph containing [text]. *)
1514···18171918let title_wires_through_to_head () =
2019 let s = render ~title:"Hello World" ~auth:Layout.Off [] in
2121- Alcotest.(check bool) "<title>...</title>" true
2020+ Alcotest.(check bool)
2121+ "<title>...</title>" true
2222 (Astring.String.is_infix ~affix:"<title>Hello World</title>" s)
23232424let content_is_rendered () =
2525 let marker = Tw_html.txt "<<<unique-content-marker>>>" in
2626 let s = render ~title:"t" ~auth:Layout.Off [ marker ] in
2727- Alcotest.(check bool) "content visible" true
2828- (Astring.String.is_infix ~affix:"<<<unique-content-marker>>>" s
2727+ Alcotest.(check bool)
2828+ "content visible" true
2929+ (Astring.String.is_infix
3030+ ~affix:"<<<unique-content-marker>>>" s
2931 || Astring.String.is_infix ~affix:"<<<unique-content-marker>>>" s)
30323133let auth_off_has_no_signin () =
3234 let s = render ~title:"t" ~auth:Layout.Off [] in
3333- Alcotest.(check bool) "no 'Sign in'" false
3535+ Alcotest.(check bool)
3636+ "no 'Sign in'" false
3437 (Astring.String.is_infix ~affix:"Sign in" s)
35383639let auth_anon_shows_signin () =
3740 let s = render ~title:"t" ~auth:Layout.Anon [] in
3838- Alcotest.(check bool) "Sign in" true
4141+ Alcotest.(check bool)
4242+ "Sign in" true
3943 (Astring.String.is_infix ~affix:"Sign in" s)
40444145let auth_signed_in_shows_name () =
···4650 { email = "alice@ex.com"; name = "Alice"; avatar_url = "" })
4751 []
4852 in
4949- Alcotest.(check bool) "name visible" true
5353+ Alcotest.(check bool)
5454+ "name visible" true
5055 (Astring.String.is_infix ~affix:"Alice" s);
5151- Alcotest.(check bool) "Sign out form" true
5656+ Alcotest.(check bool)
5757+ "Sign out form" true
5258 (Astring.String.is_infix ~affix:"Sign out" s)
53595460let auth_signed_in_email_fallback () =
···5662 let s =
5763 render ~title:"t"
5864 ~auth:
5959- (Layout.Signed_in
6060- { email = "bob@ex.com"; name = ""; avatar_url = "" })
6565+ (Layout.Signed_in { email = "bob@ex.com"; name = ""; avatar_url = "" })
6166 []
6267 in
6363- Alcotest.(check bool) "email fallback visible" true
6868+ Alcotest.(check bool)
6969+ "email fallback visible" true
6470 (Astring.String.is_infix ~affix:"bob@ex.com" s)
65716672let title_h1_wraps_text () =
6773 let s = Tw_html.to_string (Layout.title_h1 "Heading") in
6868- Alcotest.(check bool) "<h1" true
6969- (Astring.String.is_infix ~affix:"<h1" s);
7070- Alcotest.(check bool) "heading text" true
7474+ Alcotest.(check bool) "<h1" true (Astring.String.is_infix ~affix:"<h1" s);
7575+ Alcotest.(check bool)
7676+ "heading text" true
7177 (Astring.String.is_infix ~affix:"Heading" s)
72787379let summary_is_a_paragraph () =
7480 let s = Tw_html.to_string (Layout.summary "Short description.") in
7575- Alcotest.(check bool) "<p" true
7676- (Astring.String.is_infix ~affix:"<p" s);
7777- Alcotest.(check bool) "summary text" true
8181+ Alcotest.(check bool) "<p" true (Astring.String.is_infix ~affix:"<p" s);
8282+ Alcotest.(check bool)
8383+ "summary text" true
7884 (Astring.String.is_infix ~affix:"Short description." s)
79858086let suite =
···8995 Alcotest.test_case "Anon shows Sign in" `Quick auth_anon_shows_signin;
9096 Alcotest.test_case "Signed_in shows name + sign-out" `Quick
9197 auth_signed_in_shows_name;
9292- Alcotest.test_case "Signed_in falls back to email when name empty"
9393- `Quick auth_signed_in_email_fallback;
9898+ Alcotest.test_case "Signed_in falls back to email when name empty" `Quick
9999+ auth_signed_in_email_fallback;
94100 Alcotest.test_case "title_h1 wraps its text in <h1>" `Quick
95101 title_h1_wraps_text;
96102 Alcotest.test_case "summary wraps its text in <p>" `Quick
+18-17
test/ui/test_table.ml
···11(** Tests for [Table].
2233 Spec:
44- - [head cols] renders a [<thead>] with one [<th>] per column, each
55- showing the column's label.
44+ - [head cols] renders a [<thead>] with one [<th>] per column, each showing
55+ the column's label.
66 - [row cells] renders a [<tr>] containing the given cells.
77 - [cell] renders [<td>].
88 - [dim_cell] / [mono_cell] are specialised [<td>]s carrying their text.
···35353636let row_is_a_tr () =
3737 let s = Tw_html.to_string (Table.row [ Table.cell [ Tw_html.txt "x" ] ]) in
3838- Alcotest.(check bool) "<tr" true
3939- (Astring.String.is_infix ~affix:"<tr" s);
4040- Alcotest.(check bool) "<td" true
4141- (Astring.String.is_infix ~affix:"<td" s);
4242- Alcotest.(check bool) "cell content" true
3838+ Alcotest.(check bool) "<tr" true (Astring.String.is_infix ~affix:"<tr" s);
3939+ Alcotest.(check bool) "<td" true (Astring.String.is_infix ~affix:"<td" s);
4040+ Alcotest.(check bool)
4141+ "cell content" true
4342 (Astring.String.is_infix ~affix:">x<" s)
44434544let dim_and_mono_cells_render_text () =
4645 let d = Tw_html.to_string (Table.dim_cell "—") in
4746 let m = Tw_html.to_string (Table.mono_cell "abcdef0") in
4847 Alcotest.(check bool) "dim text" true (Astring.String.is_infix ~affix:"—" d);
4949- Alcotest.(check bool) "mono text" true
4848+ Alcotest.(check bool)
4949+ "mono text" true
5050 (Astring.String.is_infix ~affix:"abcdef0" m);
5151- Alcotest.(check bool) "dim differs from mono" true
5252- (not (String.equal d m))
5151+ Alcotest.(check bool) "dim differs from mono" true (not (String.equal d m))
53525453let wrap_produces_table_tag () =
5554 let s =
···5857 ~head:(Table.head [ ("c", Table.Left) ])
5958 [ Table.row [ Table.cell [ Tw_html.txt "r" ] ] ])
6059 in
6161- Alcotest.(check bool) "<table" true
6060+ Alcotest.(check bool)
6161+ "<table" true
6262 (Astring.String.is_infix ~affix:"<table" s);
6363- Alcotest.(check bool) "contains head" true
6363+ Alcotest.(check bool)
6464+ "contains head" true
6465 (Astring.String.is_infix ~affix:"<th" s);
6565- Alcotest.(check bool) "contains row" true
6666+ Alcotest.(check bool)
6767+ "contains row" true
6668 (Astring.String.is_infix ~affix:"<tr" s)
67696870let suite =
6971 ( "table",
7072 [
7171- Alcotest.test_case "head: one <th> per column, all labels visible"
7272- `Quick head_has_one_th_per_column;
7373- Alcotest.test_case "row is a <tr> containing its cells" `Quick
7474- row_is_a_tr;
7373+ Alcotest.test_case "head: one <th> per column, all labels visible" `Quick
7474+ head_has_one_th_per_column;
7575+ Alcotest.test_case "row is a <tr> containing its cells" `Quick row_is_a_tr;
7576 Alcotest.test_case "dim_cell and mono_cell render distinctly" `Quick
7677 dim_and_mono_cells_render_text;
7778 Alcotest.test_case "wrap yields a <table> containing head + rows" `Quick
···55 Non-string-keyed entries are dropped silently.
66 - A YAML sequence yields [Indexed] children.
77 - Scalar input yields [Named []].
88- - [parse (serialize c) = c] on member names (YAML re-emission may
99- reformat values but must preserve the logical member set). *)
88+ - [parse (serialize c) = c] on member names (YAML re-emission may reformat
99+ values but must preserve the logical member set). *)
10101111let parse_mapping_exact_names () =
1212 match Irmin_yaml.parse "name: alice\nage: 30\n" with
···2323 (fun i c ->
2424 match c with
2525 | `Inline _ -> ()
2626- | `Link _ ->
2727- Alcotest.failf "sequence index %d should be Inline" i)
2626+ | `Link _ -> Alcotest.failf "sequence index %d should be Inline" i)
2827 arr
2928 | _ -> Alcotest.fail "parse_sequence_exact_length"
3029