+3
.gitignore
+3
.gitignore
+12
-1
.tangled/workflows/build.yml
+12
-1
.tangled/workflows/build.yml
······
+36
README.md
+36
README.md
···+Yamlrw is tested against the official [YAML Test Suite](https://github.com/yaml/yaml-test-suite), a comprehensive collection of YAML test cases.+- The HTML reports are generated in `_build/default/tests/yaml-test-results.html` and `_build/default/tests/yaml-test-results-eio.html`
+120
-99
bin/yamlcat.ml
+120
-99
bin/yamlcat.ml
············
+1
dune
+1
dune
+4
dune-project
+4
dune-project
·········
+6
-12
lib/char_class.ml
+6
-12
lib/char_class.ml
······
+33
lib/char_class.mli
+33
lib/char_class.mli
···
+5
-19
lib/chomping.ml
+5
-19
lib/chomping.ml
···
+26
lib/chomping.mli
+26
lib/chomping.mli
···
+16
-20
lib/document.ml
+16
-20
lib/document.ml
·········
+41
lib/document.mli
+41
lib/document.mli
···
+63
-107
lib/eio/yamlrw_eio.ml
+63
-107
lib/eio/yamlrw_eio.ml
························
+66
-52
lib/eio/yamlrw_eio.mli
+66
-52
lib/eio/yamlrw_eio.mli
·······································
+210
-199
lib/emitter.ml
+210
-199
lib/emitter.ml
····································-push_state t In_flow_mapping_value; (* After ] we'll be in value position but sequence handles it *)························
+62
lib/emitter.mli
+62
lib/emitter.mli
···
+12
-20
lib/encoding.ml
+12
-20
lib/encoding.ml
·········
+27
lib/encoding.mli
+27
lib/encoding.mli
···
+135
-105
lib/error.ml
+135
-105
lib/error.ml
·········-{{:https://yaml.org/spec/1.2.2/#3222-anchors-and-aliases}Section 3.2.2.2 (Anchors and Aliases)}. *)-{{:https://yaml.org/spec/1.2.2/#3222-anchors-and-aliases}Section 3.2.2.2 (Anchors and Aliases)}. *)-{{:https://yaml.org/spec/1.2.2/#683-reserved-directives}Section 6.8.3 (Reserved Directives)}. *)-{{:https://yaml.org/spec/1.2.2/#82-block-collection-styles}Section 8.2 (Block Collection Styles)}. *)(* Parser errors - see {{:https://yaml.org/spec/1.2.2/#3-processing-yaml-information}Section 3 (Processing)} *)-{{:https://yaml.org/spec/1.2.2/#3222-anchors-and-aliases}Section 3.2.2.2 (Anchors and Aliases)}. *)-{{:https://yaml.org/spec/1.2.2/#3222-anchors-and-aliases}Section 3.2.2.2 (Anchors and Aliases)}. *)-{{:https://yaml.org/spec/1.2.2/#3222-anchors-and-aliases}Section 3.2.2.2 (Anchors and Aliases)}. *)(* Loader errors - see {{:https://yaml.org/spec/1.2.2/#31-processes}Section 3.1 (Processes)} *)-See {{:https://yaml.org/spec/1.2.2/#3222-anchors-and-aliases}Section 3.2.2.2 (Anchors and Aliases)}. *)-(** Alias expansion exceeded maximum nesting depth (protection against deeply nested aliases).··················
+120
lib/error.mli
+120
lib/error.mli
···
+17
-30
lib/event.ml
+17
-30
lib/event.ml
······
+49
lib/event.mli
+49
lib/event.mli
···
+50
-71
lib/input.ml
+50
-71
lib/input.ml
····································
+97
lib/input.mli
+97
lib/input.mli
···
+7
-18
lib/layout_style.ml
+7
-18
lib/layout_style.ml
···
+24
lib/layout_style.mli
+24
lib/layout_style.mli
···
+184
-237
lib/loader.ml
+184
-237
lib/loader.ml
············
+104
lib/loader.mli
+104
lib/loader.mli
···+val fold_documents_parser : ('a -> Document.t -> 'a) -> 'a -> (unit -> Event.spanned option) -> 'a
+40
-47
lib/mapping.ml
+40
-47
lib/mapping.ml
······
+54
lib/mapping.mli
+54
lib/mapping.mli
···
+267
-342
lib/parser.ml
+267
-342
lib/parser.ml
··············································································-Error.raise_span tok.span (Invalid_directive "directives require explicit document end '...' before them");
+38
lib/parser.mli
+38
lib/parser.mli
···
+11
-28
lib/position.ml
+11
-28
lib/position.ml
···
+42
lib/position.mli
+42
lib/position.mli
···
+31
-27
lib/quoting.ml
+31
-27
lib/quoting.ml
······
+22
lib/quoting.mli
+22
lib/quoting.mli
···
+24
-30
lib/scalar.ml
+24
-30
lib/scalar.ml
······
+38
lib/scalar.mli
+38
lib/scalar.mli
···
+8
-11
lib/scalar_style.ml
+8
-11
lib/scalar_style.ml
······
+27
lib/scalar_style.mli
+27
lib/scalar_style.mli
···
+558
-438
lib/scanner.ml
+558
-438
lib/scanner.ml
···-mutable document_has_content : bool; (** True if we've emitted content tokens in current document *)-mutable adjacent_value_allowed_at : Position.t option; (** Position where adjacent : is allowed *)················································-if not (Input.is_eof t.input) && not (Input.next_is_break t.input) && col <= indent && indent >= 0 then-Error.raise_at (Input.mark t.input) (Invalid_quoted_scalar_indentation "invalid indentation in quoted scalar");···-if not (Input.is_eof t.input) && not (Input.next_is_break t.input) && col <= indent && indent >= 0 then-Error.raise_at (Input.mark t.input) (Invalid_quoted_scalar_indentation "invalid indentation in quoted scalar")·····················-Error.raise_at (Input.mark t.input) (Invalid_quoted_scalar_indentation "invalid indentation in quoted scalar");-Error.raise_at (Input.mark t.input) (Invalid_quoted_scalar_indentation "invalid indentation in quoted scalar");···························-let max_empty_line_indent = ref 0 in (* Track max indent of empty lines before first content *)························Note: we check Input.next_is_blank BEFORE reading content to see if content starts with whitespace. *)so we should NOT add any back. On subsequent lines, we add only the spaces beyond content_indent. *)············-Error.raise_at (Input.mark t.input) (Invalid_directive "expected comment or line break after version");···············-| _ -> Error.raise_at start (Invalid_directive "content not allowed after document end marker on same line"))···-(Unexpected_token "directives must be separated from document content by document end marker (...)");··················(* : followed by whitespace in block, or whitespace/flow indicator in flow, or adjacent value *)············(* In block context without simple key, allow simple keys for compact mappings like ": moon: white"(* Check for tabs after : : patterns like :\t- or :\tkey: are invalid in block context (Y79Y/09)(* In block context, tabs-only after : followed by indicator or alphanumeric are not allowed *)··················
+43
lib/scanner.mli
+43
lib/scanner.mli
···
+22
-34
lib/sequence.ml
+22
-34
lib/sequence.ml
······
+46
lib/sequence.mli
+46
lib/sequence.mli
···
+176
-159
lib/serialize.ml
+176
-159
lib/serialize.ml
············-let documents_to_buffer ?(config = Emitter.default_config) ?(resolve_aliases = true) ?buffer documents =···-let documents_to_string ?(config = Emitter.default_config) ?(resolve_aliases = true) documents =······-let documents_to_writer ?(config = Emitter.default_config) ?(resolve_aliases = true) ?(eod = true) writer documents =······
+133
lib/serialize.mli
+133
lib/serialize.mli
···
+10
-16
lib/span.ml
+10
-16
lib/span.ml
···
+35
lib/span.mli
+35
lib/span.mli
···
+12
-14
lib/tag.ml
+12
-14
lib/tag.ml
······
+54
lib/tag.mli
+54
lib/tag.mli
···
+30
-51
lib/token.ml
+30
-51
lib/token.ml
···
+43
lib/token.mli
+43
lib/token.mli
···
+38
-66
lib/unix/yamlrw_unix.ml
+38
-66
lib/unix/yamlrw_unix.ml
·········
+4
-12
lib/unix/yamlrw_unix.mli
+4
-12
lib/unix/yamlrw_unix.mli
······
+16
-20
lib/value.ml
+16
-20
lib/value.ml
···············
+70
lib/value.mli
+70
lib/value.mli
···
+118
-111
lib/yaml.ml
+118
-111
lib/yaml.ml
·········-@raise Error.Yamlrw_error with {!type:Error.kind} [Alias_expansion_node_limit] if max_nodes is exceeded-@raise Error.Yamlrw_error with {!type:Error.kind} [Alias_expansion_depth_limit] if max_depth is exceeded-let resolve_aliases ?(max_nodes = default_max_alias_nodes) ?(max_depth = default_max_alias_depth) (root : t) : t =···············-@raise Error.Yamlrw_error with {!type:Error.kind} [Unresolved_alias] if resolve_aliases_first is false and an alias is encountered
+63
lib/yaml.mli
+63
lib/yaml.mli
···
+183
-253
lib/yamlrw.ml
+183
-253
lib/yamlrw.ml
······-version : (int * int) option; (** Optional YAML version directive (e.g., (1, 2) for YAML 1.2) *)······-Buffer.contents (documents_to_buffer ~encoding ~scalar_style ~layout_style ~resolve_aliases documents)-(Yaml.to_value ~resolve_aliases_first:resolve_aliases ~max_nodes ~max_depth (yaml :> Yaml.t) :> value)·································
+96
-90
lib/yamlrw.mli
+96
-90
lib/yamlrw.mli
·········-version : (int * int) option; (** Optional YAML version directive (e.g., (1, 2) for YAML 1.2) *)··································································-val scalar : emitter -> ?anchor:string -> ?tag:string -> ?style:Scalar_style.t -> string -> unit···-val sequence_start : emitter -> ?anchor:string -> ?tag:string -> ?style:Layout_style.t -> unit -> unit···-val mapping_start : emitter -> ?anchor:string -> ?tag:string -> ?style:Layout_style.t -> unit -> unit···
+1
tests/cram/anchor_flow_map.yml
+1
tests/cram/anchor_flow_map.yml
···
+1
tests/cram/anchor_flow_seq.yml
+1
tests/cram/anchor_flow_seq.yml
···
+4
tests/cram/anchor_multiple_refs.yml
+4
tests/cram/anchor_multiple_refs.yml
+9
-21
tests/cram/anchors.t
+9
-21
tests/cram/anchors.t
············
+1
tests/cram/bell_character.yml
+1
tests/cram/bell_character.yml
···
+8
-8
tests/cram/collections.t
+8
-8
tests/cram/collections.t
···-{simple_sequence: [apple, banana, cherry, date]simple_mapping, {name: John Doe, age: 30, city: New York, country: USA}, nested_sequences: [[alpha, beta, gamma], [one, two, three], [red, green, blue]]nested_mappings, {person: {name: Alice, contact: {email: alice@example.com, phone: 555-1234}address, {street: 123 Main St, city: Boston}}}, mapping_with_sequences: {colors: [red, green, blue]sizes, [small, medium, large], numbers: [1, 2, 3]}sequence_with_mappings, [{name: Alice, age: 25, role: developer}, {name: Bob, age: 30, role: designer}, {name: Charlie, age: 35, role: manager}], deep_nesting: {level1: {level2: {level3: {level4: [deeply, nested, values]another_key, value: }items, [item1, item2]}metadata, {created: 2024-01-01, modified: 2024-12-04}}}complex_structure, {database: {connections: [{host: db1.example.com, port: 5432, credentials: {username: admin, password: secret}}, {host: db2.example.com, port: 5432, credentials: {username: readonly, password: public}}]}services, [{name: api, endpoints: [/users, /posts, /comments]config, {timeout: 30, retries: 3}}, {name: worker, tasks: [email, reports]config, {concurrency: 10}}]}, empty_collections: {empty_sequence: []empty_mapping, {}, sequence_with_empty: [value1, [], value2]mapping_with_empty, {key1: value1, key2: {}key3, value3: }}}+{simple_sequence: [apple, banana, cherry, date], simple_mapping: {name: John Doe, age: 30, city: New York, country: USA}, nested_sequences: [[alpha, beta, gamma], [one, two, three], [red, green, blue]], nested_mappings: {person: {name: Alice, contact: {email: alice@example.com, phone: 555-1234}, address: {street: 123 Main St, city: Boston}}}, mapping_with_sequences: {colors: [red, green, blue], sizes: [small, medium, large], numbers: [1, 2, 3]}, sequence_with_mappings: [{name: Alice, age: 25, role: developer}, {name: Bob, age: 30, role: designer}, {name: Charlie, age: 35, role: manager}], deep_nesting: {level1: {level2: {level3: {level4: [deeply, nested, values], another_key: value}, items: [item1, item2]}, metadata: {created: 2024-01-01, modified: 2024-12-04}}}, complex_structure: {database: {connections: [{host: db1.example.com, port: 5432, credentials: {username: admin, password: secret}}, {host: db2.example.com, port: 5432, credentials: {username: readonly, password: public}}]}, services: [{name: api, endpoints: [/users, /posts, /comments], config: {timeout: 30, retries: 3}}, {name: worker, tasks: [email, reports], config: {concurrency: 10}}]}, empty_collections: {empty_sequence: [], empty_mapping: {}, sequence_with_empty: [value1, [], value2], mapping_with_empty: {key1: value1, key2: {}, key3: value3}}}···-{compact_sequence: [{name: Alice, age: 25, city: Boston}, {name: Bob, age: 30, city: Seattle}, {name: Charlie, age: 35, city: Portland}]compact_nested, [{id: 1, details: {type: admin, permissions: [read, write, delete]}}, {id: 2, details: {type: user, permissions: [read]}}], compact_complex: [{key1: value1, key2: value2, nested: {sub1: val1, sub2: val2}}, {key1: value3, key2: value4, nested: {sub1: val3, sub2: val4}}]users, [{username: alice, email: alice@example.com, active: true}, {username: bob, email: bob@example.com, active: false}], compact_with_flow: [{name: service1, ports: [8080, 8443]env, {DEBUG: true, MODE: production}}, {name: service2, ports: [3000]env, {DEBUG: false, MODE: development}}]deep_compact, [{category: electronics, items: [{name: laptop, specs: {cpu: Intel i7, ram: 16GB, storage: 512GB SSD}}, {name: phone, specs: {os: Android, ram: 8GB, storage: 256GB}}]}, {category: furniture, items: [{name: desk, dimensions: {width: 150cm, depth: 75cm, height: 75cm}}, {name: chair, dimensions: {width: 60cm, depth: 60cm, height: 120cm}}]}], mixed_compact: {databases: [{type: postgresql, connection: {host: localhost, port: 5432}credentials, {user: admin, password: secret}}, {type: mongodb, connection: {host: localhost, port: 27017}credentials, {user: root, password: root}}]}single_line_compact, [{name: Alice, age: 25, role: developer}, {name: Bob, age: 30, role: designer}, {name: Charlie, age: 35, role: manager}], sequences_in_compact: [{title: Project A, members: [Alice, Bob, Charlie]tags, [urgent, backend]}, {title: Project B, members: [David, Eve]tags, [frontend, design]}]compact_with_empty, [{id: 1, data: []meta, {}}, {id: 2, data: [item1]meta, {key: value}}], compact_complex_nesting: [{level: 1, children: [{level: 2a, children: [{level: 3a, value: leaf1}, {level: 3b, value: leaf2}]}, {level: 2b, children: [{level: 3c, value: leaf3}]}]}]api_endpoints, [{path: /users, method: GET, auth: required, params: [{name: page, type: integer, default: 1}, {name: limit, type: integer, default: 10}]}, {path: '/users/:id', method: GET, auth: required, params: []}, {path: /users, method: POST, auth: required, body: {username: string, email: string, password: string}}], compact_types: [{string_val: hello, number_val: 42, float_val: 3.14, bool_val: true, null_val: null}, {string_val: world, number_val: 100, float_val: 2.71, bool_val: false, null_val: null}]minimal, [{a: 1}, {b: 2}, {c: 3}]}+{compact_sequence: [{name: Alice, age: 25, city: Boston}, {name: Bob, age: 30, city: Seattle}, {name: Charlie, age: 35, city: Portland}], compact_nested: [{id: 1, details: {type: admin, permissions: [read, write, delete]}}, {id: 2, details: {type: user, permissions: [read]}}], compact_complex: [{key1: value1, key2: value2, nested: {sub1: val1, sub2: val2}}, {key1: value3, key2: value4, nested: {sub1: val3, sub2: val4}}], users: [{username: alice, email: alice@example.com, active: true}, {username: bob, email: bob@example.com, active: false}], compact_with_flow: [{name: service1, ports: [8080, 8443], env: {DEBUG: true, MODE: production}}, {name: service2, ports: [3000], env: {DEBUG: false, MODE: development}}], deep_compact: [{category: electronics, items: [{name: laptop, specs: {cpu: Intel i7, ram: 16GB, storage: 512GB SSD}}, {name: phone, specs: {os: Android, ram: 8GB, storage: 256GB}}]}, {category: furniture, items: [{name: desk, dimensions: {width: 150cm, depth: 75cm, height: 75cm}}, {name: chair, dimensions: {width: 60cm, depth: 60cm, height: 120cm}}]}], mixed_compact: {databases: [{type: postgresql, connection: {host: localhost, port: 5432}, credentials: {user: admin, password: secret}}, {type: mongodb, connection: {host: localhost, port: 27017}, credentials: {user: root, password: root}}]}, single_line_compact: [{name: Alice, age: 25, role: developer}, {name: Bob, age: 30, role: designer}, {name: Charlie, age: 35, role: manager}], sequences_in_compact: [{title: Project A, members: [Alice, Bob, Charlie], tags: [urgent, backend]}, {title: Project B, members: [David, Eve], tags: [frontend, design]}], compact_with_empty: [{id: 1, data: [], meta: {}}, {id: 2, data: [item1], meta: {key: value}}], compact_complex_nesting: [{level: 1, children: [{level: 2a, children: [{level: 3a, value: leaf1}, {level: 3b, value: leaf2}]}, {level: 2b, children: [{level: 3c, value: leaf3}]}]}], api_endpoints: [{path: /users, method: GET, auth: required, params: [{name: page, type: integer, default: 1}, {name: limit, type: integer, default: 10}]}, {path: '/users/:id', method: GET, auth: required, params: []}, {path: /users, method: POST, auth: required, body: {username: string, email: string, password: string}}], compact_types: [{string_val: hello, number_val: 42, float_val: 3.14, bool_val: true, null_val: null}, {string_val: world, number_val: 100, float_val: 2.71, bool_val: false, null_val: null}], minimal: [{a: 1}, {b: 2}, {c: 3}]}···-{simple_flow_sequence: [apple, banana, cherry, date]simple_flow_mapping, {name: John, age: 30, city: New York}, nested_flow_sequences: [[a, b, c], [1, 2, 3], [red, green, blue]]nested_flow_mappings, {person: {name: Alice, age: 25}contact, {email: alice@example.com, phone: 555-1234}}, flow_seq_with_maps: [{name: Alice, role: dev}, {name: Bob, role: ops}, {name: Charlie, role: qa}]flow_map_with_seqs, {colors: [red, green, blue]sizes, [S, M, L], numbers: [1, 2, 3]}, deep_flow_nesting: {level1: {level2: {level3: {level4: [a, b, c]}}}}empty_flow, {empty_seq: []empty_map, {}, both: [[], {}]}, flow_in_block: {sequence: [1, 2, 3, 4, 5]mapping, {a: 1, b: 2, c: 3}, nested: {items: [x, y, z]config, {timeout: 30, retries: 3}}}block_in_flow, {users: [{name: Alice, tags: [dev, senior]}, {name: Bob, tags: [ops, junior]}]}, mixed_structure: {services: [{name: api, ports: [8080, 8443]env, {DEBUG: true, LOG_LEVEL: info}}, {name: db, ports: [5432]env, {POSTGRES_DB: mydb, POSTGRES_USER: admin}}]config, {version: 1, enabled: true}}flow_types, {strings: [hello, world, foo, bar]numbers, [1, 2, 3, 42, 100], mixed: [string, 123, true, false, null]quoted, [with spaces, 'special:chars', commas, here]}, flow_map_types: {string: value, number: 42, boolean: true, null_value: null, float: 3.14}nested_mixed, [{id: 1, data: [a, b, c]meta, {type: first}}, {id: 2, data: [d, e, f]meta, {type: second}}, {id: 3, data: [g, h, i]meta, {type: third}}], multiline_flow: {long_sequence: [item1, item2, item3, item4]long_mapping, {key1: value1, key2: value2, key3: value3}}edge_cases, {single_item_seq: [alone]single_item_map, {only: one}, nested_empty: [[], [{}], [{}, []]]all_empty, [{}, [], {a: []}, {b: {}}]}}+{simple_flow_sequence: [apple, banana, cherry, date], simple_flow_mapping: {name: John, age: 30, city: New York}, nested_flow_sequences: [[a, b, c], [1, 2, 3], [red, green, blue]], nested_flow_mappings: {person: {name: Alice, age: 25}, contact: {email: alice@example.com, phone: 555-1234}}, flow_seq_with_maps: [{name: Alice, role: dev}, {name: Bob, role: ops}, {name: Charlie, role: qa}], flow_map_with_seqs: {colors: [red, green, blue], sizes: [S, M, L], numbers: [1, 2, 3]}, deep_flow_nesting: {level1: {level2: {level3: {level4: [a, b, c]}}}}, empty_flow: {empty_seq: [], empty_map: {}, both: [[], {}]}, flow_in_block: {sequence: [1, 2, 3, 4, 5], mapping: {a: 1, b: 2, c: 3}, nested: {items: [x, y, z], config: {timeout: 30, retries: 3}}}, block_in_flow: {users: [{name: Alice, tags: [dev, senior]}, {name: Bob, tags: [ops, junior]}]}, mixed_structure: {services: [{name: api, ports: [8080, 8443], env: {DEBUG: true, LOG_LEVEL: info}}, {name: db, ports: [5432], env: {POSTGRES_DB: mydb, POSTGRES_USER: admin}}], config: {version: 1, enabled: true}}, flow_types: {strings: [hello, world, foo, bar], numbers: [1, 2, 3, 42, 100], mixed: [string, 123, true, false, null], quoted: [with spaces, 'special:chars', commas, here]}, flow_map_types: {string: value, number: 42, boolean: true, null_value: null, float: 3.14}, nested_mixed: [{id: 1, data: [a, b, c], meta: {type: first}}, {id: 2, data: [d, e, f], meta: {type: second}}, {id: 3, data: [g, h, i], meta: {type: third}}], multiline_flow: {long_sequence: [item1, item2, item3, item4], long_mapping: {key1: value1, key2: value2, key3: value3}}, edge_cases: {single_item_seq: [alone], single_item_map: {only: one}, nested_empty: [[], [{}], [{}, []]], all_empty: [{}, [], {a: []}, {b: {}}]}}······-[{id: 1, tags: [a, b, c]config, {enabled: true}}, {id: 2, tags: [x, y, z]config, {enabled: false}}]+[{id: 1, tags: [a, b, c], config: {enabled: true}}, {id: 2, tags: [x, y, z], config: {enabled: false}}]·········
+4
tests/cram/directive_with_comment.yml
+4
tests/cram/directive_with_comment.yml
+4
tests/cram/doc_with_comments.yml
+4
tests/cram/doc_with_comments.yml
+11
-35
tests/cram/documents.t
+11
-35
tests/cram/documents.t
············
+6
-14
tests/cram/empty_collections.t
+6
-14
tests/cram/empty_collections.t
······
+1
tests/cram/empty_map.yml
+1
tests/cram/empty_map.yml
···
+1
tests/cram/empty_seq.yml
+1
tests/cram/empty_seq.yml
···
+1
tests/cram/escaped_backslashes.yml
+1
tests/cram/escaped_backslashes.yml
···
+7
-8
tests/cram/failing_escapes.t
+7
-8
tests/cram/failing_escapes.t
···
+1
tests/cram/failing_escapes.yml
+1
tests/cram/failing_escapes.yml
···
+1
tests/cram/lowercase_u_unicode.yml
+1
tests/cram/lowercase_u_unicode.yml
···
+1
tests/cram/mixed_escapes.yml
+1
tests/cram/mixed_escapes.yml
···
+2
-3
tests/cram/multidoc.t
+2
-3
tests/cram/multidoc.t
···
+1
tests/cram/multiple_escapes.yml
+1
tests/cram/multiple_escapes.yml
···
+5
tests/cram/nested_mappings.yml
+5
tests/cram/nested_mappings.yml
+5
tests/cram/scalar_code_sample.yml
+5
tests/cram/scalar_code_sample.yml
+1
tests/cram/scalar_double_empty.yml
+1
tests/cram/scalar_double_empty.yml
···
+1
tests/cram/scalar_double_quote.yml
+1
tests/cram/scalar_double_quote.yml
···
+1
tests/cram/scalar_double_simple.yml
+1
tests/cram/scalar_double_simple.yml
···
+1
tests/cram/scalar_empty_folded.yml
+1
tests/cram/scalar_empty_folded.yml
···
+1
tests/cram/scalar_empty_literal.yml
+1
tests/cram/scalar_empty_literal.yml
···
+4
tests/cram/scalar_folded_basic.yml
+4
tests/cram/scalar_folded_basic.yml
+4
tests/cram/scalar_folded_comment.yml
+4
tests/cram/scalar_folded_comment.yml
+8
tests/cram/scalar_folded_indent_preserve.yml
+8
tests/cram/scalar_folded_indent_preserve.yml
+6
tests/cram/scalar_folded_para.yml
+6
tests/cram/scalar_folded_para.yml
+5
tests/cram/scalar_folded_strip.yml
+5
tests/cram/scalar_folded_strip.yml
+4
tests/cram/scalar_indent2_folded.yml
+4
tests/cram/scalar_indent2_folded.yml
+6
tests/cram/scalar_indent2_keep.yml
+6
tests/cram/scalar_indent2_keep.yml
+4
tests/cram/scalar_indent2_literal.yml
+4
tests/cram/scalar_indent2_literal.yml
+4
tests/cram/scalar_indent2_strip.yml
+4
tests/cram/scalar_indent2_strip.yml
+6
tests/cram/scalar_keep_folded.yml
+6
tests/cram/scalar_keep_folded.yml
+4
tests/cram/scalar_literal_indent.yml
+4
tests/cram/scalar_literal_indent.yml
+8
tests/cram/scalar_nested_blocks.yml
+8
tests/cram/scalar_nested_blocks.yml
+1
tests/cram/scalar_plain_simple.yml
+1
tests/cram/scalar_plain_simple.yml
···
+5
tests/cram/scalar_plain_types.yml
+5
tests/cram/scalar_plain_types.yml
+7
tests/cram/scalar_seq_blocks.yml
+7
tests/cram/scalar_seq_blocks.yml
+1
tests/cram/scalar_single_dquote.yml
+1
tests/cram/scalar_single_dquote.yml
···
+1
tests/cram/scalar_single_empty.yml
+1
tests/cram/scalar_single_empty.yml
···
+1
tests/cram/scalar_single_escaped.yml
+1
tests/cram/scalar_single_escaped.yml
···
+1
tests/cram/scalar_single_simple.yml
+1
tests/cram/scalar_single_simple.yml
···
+4
tests/cram/scalar_special_chars.yml
+4
tests/cram/scalar_special_chars.yml
+3
tests/cram/scalar_whitespace.yml
+3
tests/cram/scalar_whitespace.yml
+49
-142
tests/cram/scalars.t
+49
-142
tests/cram/scalars.t
···························{"outer": {"inner": {"description": "This is a folded description.\n", "code": "def test():\n return True\n"}}}
+1
tests/cram/simple_hello.yml
+1
tests/cram/simple_hello.yml
···
+5
tests/cram/special_values.yml
+5
tests/cram/special_values.yml
+4
tests/cram/start_with_comment.yml
+4
tests/cram/start_with_comment.yml
+1
tests/cram/tab_columns.yml
+1
tests/cram/tab_columns.yml
···
+1
tests/cram/uppercase_U_unicode.yml
+1
tests/cram/uppercase_U_unicode.yml
···
+1
tests/cram/windows_path.yml
+1
tests/cram/windows_path.yml
···
+11
-33
tests/cram/yamlcat.t
+11
-33
tests/cram/yamlcat.t
·········
+40
tests/dune
+40
tests/dune
···
+216
-144
tests/run_all_tests.ml
+216
-144
tests/run_all_tests.ml
··················-let fail_count = List.length (List.filter (fun r -> match r.status with `Fail _ -> true | _ -> false) results) in-let json_fail_count = List.length (List.filter (fun r -> match r.json_status with `Fail _ -> true | _ -> false) results) in···-let json_badge = Printf.sprintf {|<span class="badge %s" style="margin-left: 4px;">JSON: %s</span>|}···-Printf.fprintf oc {| <div class="test" data-status="%s" data-json-status="%s" data-id="%s" data-name="%s">······-let fail_count = List.length (List.filter (fun r -> match r.status with `Fail _ -> true | _ -> false) results) in-let json_fail_count = List.length (List.filter (fun r -> match r.json_status with `Fail _ -> true | _ -> false) results) in
+230
-162
tests/run_all_tests_eio.ml
+230
-162
tests/run_all_tests_eio.ml
············-let fail_count = List.length (List.filter (fun r -> match r.status with `Fail _ -> true | _ -> false) results) in-let json_fail_count = List.length (List.filter (fun r -> match r.json_status with `Fail _ -> true | _ -> false) results) in···-let json_badge = Printf.sprintf {|<span class="badge %s" style="margin-left: 4px;">JSON: %s</span>|}···-Printf.bprintf buf {| <div class="test" data-status="%s" data-json-status="%s" data-id="%s" data-name="%s">······-Arg.parse args (fun _ -> ()) "Usage: run_all_tests_eio [--html <file>] [--show-skipped] [--sequential]";-Printf.printf "Loaded %d tests in %.3fs\n%!" (List.length all_tests) (load_time -. start_time);-let fail_count = List.length (List.filter (fun r -> match r.status with `Fail _ -> true | _ -> false) results) in-let json_fail_count = List.length (List.filter (fun r -> match r.json_status with `Fail _ -> true | _ -> false) results) in
+6
-1
tests/test_suite_lib/dune
+6
-1
tests/test_suite_lib/dune
···
+29
-27
tests/test_suite_lib/json_compare.ml
+29
-27
tests/test_suite_lib/json_compare.ml
···············
+37
-27
tests/test_suite_lib/json_format.ml
+37
-27
tests/test_suite_lib/json_format.ml
···-else if f = Float.infinity || f = Float.neg_infinity then "null" (* JSON doesn't support Inf *)
+5
-10
tests/test_suite_lib/test_suite_loader.ml
+5
-10
tests/test_suite_lib/test_suite_loader.ml
······
+16
-16
tests/test_suite_lib/test_suite_loader_eio.ml
+16
-16
tests/test_suite_lib/test_suite_loader_eio.ml
············
+40
-31
tests/test_suite_lib/test_suite_loader_generic.ml
+40
-31
tests/test_suite_lib/test_suite_loader_generic.ml
··················
+27
-28
tests/test_suite_lib/tree_format.ml
+27
-28
tests/test_suite_lib/tree_format.ml
·········
+283
-108
tests/test_yamlrw.ml
+283
-108
tests/test_yamlrw.ml
············-check_value "plain" (`String "hello") (of_string "hello world" |> function `String s -> `String (String.sub s 0 5) | v -> v);···-Alcotest.failf "expected 1 pair but got %d pairs (trailing comma should not create empty entry)"···-Alcotest.(check bool) "contains name" true (starts_with "name" trimmed || starts_with "\"name\"" trimmed)···············-| _ -> Alcotest.fail ("expected Alias_expansion_depth_limit error, got: " ^ Error.kind_to_string e.Error.kind))···
+1
yamlrw-eio.opam
+1
yamlrw-eio.opam