this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

more

+1886 -4
+1 -4
yaml/ocaml-yamle/tests/cram/dune
··· 1 1 (cram 2 2 (deps 3 3 (package yamle) 4 - ../yaml/seq.yml 5 - ../yaml/cohttp.yml 6 - ../yaml/linuxkit.yml 7 - ../yaml/yaml-1.2.yml)) 4 + (glob_files ../yaml/*.yml)))
+125
yaml/ocaml-yamle/tests/yaml/anchors_basic.yml
··· 1 + # Basic Anchor and Alias Test Cases 2 + # Tests fundamental anchor (&) and alias (*) functionality 3 + 4 + # Test 1: Simple scalar anchor and alias 5 + --- 6 + scalar_anchor: &simple_scalar "Hello, World!" 7 + scalar_alias: *simple_scalar 8 + # Expected: both should have the value "Hello, World!" 9 + 10 + # Test 2: Numeric scalar anchor 11 + --- 12 + original: &num 42 13 + copy: *num 14 + another_copy: *num 15 + # Expected: all three should have the value 42 16 + 17 + # Test 3: Sequence anchor and alias 18 + --- 19 + original_list: &my_list 20 + - apple 21 + - banana 22 + - cherry 23 + 24 + copied_list: *my_list 25 + # Expected: both lists should be identical 26 + 27 + # Test 4: Mapping anchor and alias 28 + --- 29 + original_map: &person 30 + name: Alice 31 + age: 30 32 + city: London 33 + 34 + copied_map: *person 35 + # Expected: both maps should be identical 36 + 37 + # Test 5: Multiple anchors in same document 38 + --- 39 + defaults: &defaults 40 + timeout: 30 41 + retries: 3 42 + 43 + colors: &colors 44 + - red 45 + - green 46 + - blue 47 + 48 + config: 49 + settings: *defaults 50 + palette: *colors 51 + # Expected: config.settings should have timeout and retries, config.palette should have the color list 52 + 53 + # Test 6: Nested structure with anchor 54 + --- 55 + template: &template 56 + metadata: 57 + version: 1.0 58 + author: John Doe 59 + settings: 60 + enabled: true 61 + debug: false 62 + 63 + instance1: *template 64 + instance2: *template 65 + # Expected: both instances should be identical copies of template 66 + 67 + # Test 7: Anchor in sequence 68 + --- 69 + items: 70 + - &first_item 71 + id: 1 72 + name: First 73 + - id: 2 74 + name: Second 75 + - *first_item 76 + # Expected: first and third items should be identical 77 + 78 + # Test 8: Multiple uses of same alias 79 + --- 80 + shared_value: &shared 100 81 + calculations: 82 + base: *shared 83 + doubled: 200 # Just a value, not calculated 84 + reference: *shared 85 + another_ref: *shared 86 + # Expected: base, reference, and another_ref should all be 100 87 + 88 + # Test 9: Boolean anchor 89 + --- 90 + feature_flag: &enabled true 91 + features: 92 + login: *enabled 93 + signup: *enabled 94 + export: *enabled 95 + # Expected: all features should be true 96 + 97 + # Test 10: Null anchor 98 + --- 99 + empty: &null_value ~ 100 + values: 101 + first: *null_value 102 + second: *null_value 103 + # Expected: all should be null 104 + 105 + # Test 11: String with special characters 106 + --- 107 + message: &msg | 108 + This is a multi-line 109 + message with some 110 + special content! 111 + 112 + output1: *msg 113 + output2: *msg 114 + # Expected: both outputs should have the same multi-line string 115 + 116 + # Test 12: Anchor in mapping value 117 + --- 118 + database: 119 + primary: &db_config 120 + host: localhost 121 + port: 5432 122 + ssl: true 123 + replica: *db_config 124 + backup: *db_config 125 + # Expected: primary, replica, and backup should all have identical configuration
+194
yaml/ocaml-yamle/tests/yaml/anchors_merge.yml
··· 1 + # Merge Key Test Cases 2 + # Tests YAML 1.1 merge key (<<) functionality 3 + # Note: Merge keys are a YAML 1.1 feature and may not be supported in YAML 1.2 4 + 5 + # Test 1: Basic merge key 6 + --- 7 + defaults: &defaults 8 + timeout: 30 9 + retries: 3 10 + verbose: false 11 + 12 + production: 13 + <<: *defaults 14 + environment: production 15 + # Expected: production should have timeout, retries, verbose from defaults, plus environment 16 + 17 + # Test 2: Override after merge 18 + --- 19 + base: &base 20 + color: red 21 + size: medium 22 + weight: 100 23 + 24 + custom: 25 + <<: *base 26 + color: blue 27 + shape: circle 28 + # Expected: custom should have size and weight from base, but color should be blue, and add shape 29 + 30 + # Test 3: Merging multiple anchors 31 + --- 32 + connection: &connection 33 + host: localhost 34 + port: 8080 35 + 36 + authentication: &auth 37 + username: admin 38 + password: secret 39 + 40 + server: 41 + <<: [*connection, *auth] 42 + ssl: true 43 + # Expected: server should have host, port, username, password, and ssl 44 + 45 + # Test 4: Multiple merges with override 46 + --- 47 + defaults: &defaults 48 + timeout: 30 49 + retries: 3 50 + 51 + advanced: &advanced 52 + cache: true 53 + pool_size: 10 54 + 55 + config: 56 + <<: [*defaults, *advanced] 57 + timeout: 60 58 + custom: value 59 + # Expected: config should have all fields from both anchors, with timeout overridden to 60 60 + 61 + # Test 5: Nested merge 62 + --- 63 + base_style: &base_style 64 + font: Arial 65 + size: 12 66 + 67 + heading_defaults: &heading 68 + <<: *base_style 69 + weight: bold 70 + 71 + main_heading: 72 + <<: *heading 73 + size: 18 74 + color: navy 75 + # Expected: main_heading should inherit from heading (which inherits from base_style) with overrides 76 + 77 + # Test 6: Merge in sequence context 78 + --- 79 + common: &common 80 + enabled: true 81 + log_level: info 82 + 83 + services: 84 + - name: web 85 + <<: *common 86 + port: 80 87 + - name: api 88 + <<: *common 89 + port: 3000 90 + - name: worker 91 + <<: *common 92 + threads: 4 93 + # Expected: each service should have enabled and log_level, plus their specific fields 94 + 95 + # Test 7: Empty merge (edge case) 96 + --- 97 + empty: &empty {} 98 + 99 + config: 100 + <<: *empty 101 + key: value 102 + # Expected: config should just have key: value 103 + 104 + # Test 8: Merge with nested structures 105 + --- 106 + metadata: &metadata 107 + created: 2023-01-01 108 + author: Admin 109 + tags: 110 + - v1 111 + - stable 112 + 113 + document: 114 + <<: *metadata 115 + title: Important Document 116 + content: Some content here 117 + # Expected: document should have all metadata fields plus title and content 118 + 119 + # Test 9: Chain of merges 120 + --- 121 + level1: &l1 122 + a: 1 123 + b: 2 124 + 125 + level2: &l2 126 + <<: *l1 127 + c: 3 128 + 129 + level3: 130 + <<: *l2 131 + d: 4 132 + # Expected: level3 should have a, b, c, and d 133 + 134 + # Test 10: Merge with conflicting keys 135 + --- 136 + first: &first 137 + name: First 138 + value: 100 139 + priority: low 140 + 141 + second: &second 142 + name: Second 143 + value: 200 144 + category: important 145 + 146 + combined: 147 + <<: [*first, *second] 148 + name: Combined 149 + # Expected: later merges and direct assignments take precedence 150 + 151 + # Test 11: Merge preserving types 152 + --- 153 + numbers: &numbers 154 + count: 42 155 + ratio: 3.14 156 + active: true 157 + 158 + derived: 159 + <<: *numbers 160 + label: Test 161 + # Expected: types should be preserved (int, float, bool) 162 + 163 + # Test 12: Complex real-world example 164 + --- 165 + db_defaults: &db_defaults 166 + pool_size: 5 167 + timeout: 30 168 + ssl: false 169 + 170 + cache_defaults: &cache_defaults 171 + ttl: 3600 172 + max_size: 1000 173 + 174 + development: 175 + database: 176 + <<: *db_defaults 177 + host: localhost 178 + name: dev_db 179 + cache: 180 + <<: *cache_defaults 181 + backend: memory 182 + 183 + production: 184 + database: 185 + <<: *db_defaults 186 + host: prod.example.com 187 + name: prod_db 188 + ssl: true 189 + pool_size: 20 190 + cache: 191 + <<: *cache_defaults 192 + backend: redis 193 + ttl: 7200 194 + # Expected: each environment should inherit defaults with environment-specific overrides
+126
yaml/ocaml-yamle/tests/yaml/collections_block.yml
··· 1 + # Block Style Collections Test File 2 + # Testing various block-style collection structures 3 + 4 + # Simple sequence 5 + simple_sequence: 6 + - apple 7 + - banana 8 + - cherry 9 + - date 10 + 11 + # Simple mapping 12 + simple_mapping: 13 + name: John Doe 14 + age: 30 15 + city: New York 16 + country: USA 17 + 18 + # Nested sequences 19 + nested_sequences: 20 + - - alpha 21 + - beta 22 + - gamma 23 + - - one 24 + - two 25 + - three 26 + - - red 27 + - green 28 + - blue 29 + 30 + # Nested mappings 31 + nested_mappings: 32 + person: 33 + name: Alice 34 + contact: 35 + email: alice@example.com 36 + phone: 555-1234 37 + address: 38 + street: 123 Main St 39 + city: Boston 40 + 41 + # Mapping containing sequences 42 + mapping_with_sequences: 43 + colors: 44 + - red 45 + - green 46 + - blue 47 + sizes: 48 + - small 49 + - medium 50 + - large 51 + numbers: 52 + - 1 53 + - 2 54 + - 3 55 + 56 + # Sequence containing mappings 57 + sequence_with_mappings: 58 + - name: Alice 59 + age: 25 60 + role: developer 61 + - name: Bob 62 + age: 30 63 + role: designer 64 + - name: Charlie 65 + age: 35 66 + role: manager 67 + 68 + # Deep nesting (4 levels) 69 + deep_nesting: 70 + level1: 71 + level2: 72 + level3: 73 + level4: 74 + - deeply 75 + - nested 76 + - values 77 + another_key: value 78 + items: 79 + - item1 80 + - item2 81 + metadata: 82 + created: 2024-01-01 83 + modified: 2024-12-04 84 + 85 + # Mixed complex structure 86 + complex_structure: 87 + database: 88 + connections: 89 + - host: db1.example.com 90 + port: 5432 91 + credentials: 92 + username: admin 93 + password: secret 94 + - host: db2.example.com 95 + port: 5432 96 + credentials: 97 + username: readonly 98 + password: public 99 + services: 100 + - name: api 101 + endpoints: 102 + - /users 103 + - /posts 104 + - /comments 105 + config: 106 + timeout: 30 107 + retries: 3 108 + - name: worker 109 + tasks: 110 + - email 111 + - reports 112 + config: 113 + concurrency: 10 114 + 115 + # Empty sequences and mappings in block style 116 + empty_collections: 117 + empty_sequence: [] 118 + empty_mapping: {} 119 + sequence_with_empty: 120 + - value1 121 + - [] 122 + - value2 123 + mapping_with_empty: 124 + key1: value1 125 + key2: {} 126 + key3: value3
+198
yaml/ocaml-yamle/tests/yaml/collections_compact.yml
··· 1 + # Compact Notation Collections Test File 2 + # Testing compact block notation and mixed styles 3 + 4 + # Compact nested mapping in sequence (most common form) 5 + compact_sequence: 6 + - name: Alice 7 + age: 25 8 + city: Boston 9 + - name: Bob 10 + age: 30 11 + city: Seattle 12 + - name: Charlie 13 + age: 35 14 + city: Portland 15 + 16 + # Compact with nested structures 17 + compact_nested: 18 + - id: 1 19 + details: 20 + type: admin 21 + permissions: 22 + - read 23 + - write 24 + - delete 25 + - id: 2 26 + details: 27 + type: user 28 + permissions: 29 + - read 30 + 31 + # Multiple keys in same sequence entry with sub-structures 32 + compact_complex: 33 + - key1: value1 34 + key2: value2 35 + nested: 36 + sub1: val1 37 + sub2: val2 38 + - key1: value3 39 + key2: value4 40 + nested: 41 + sub1: val3 42 + sub2: val4 43 + 44 + # Compact block mappings with inline values 45 + users: 46 + - username: alice 47 + email: alice@example.com 48 + active: true 49 + - username: bob 50 + email: bob@example.com 51 + active: false 52 + 53 + # Compact with flow collections 54 + compact_with_flow: 55 + - name: service1 56 + ports: [8080, 8443] 57 + env: {DEBUG: true, MODE: production} 58 + - name: service2 59 + ports: [3000] 60 + env: {DEBUG: false, MODE: development} 61 + 62 + # Deeply nested compact notation 63 + deep_compact: 64 + - category: electronics 65 + items: 66 + - name: laptop 67 + specs: 68 + cpu: Intel i7 69 + ram: 16GB 70 + storage: 512GB SSD 71 + - name: phone 72 + specs: 73 + os: Android 74 + ram: 8GB 75 + storage: 256GB 76 + - category: furniture 77 + items: 78 + - name: desk 79 + dimensions: 80 + width: 150cm 81 + depth: 75cm 82 + height: 75cm 83 + - name: chair 84 + dimensions: 85 + width: 60cm 86 + depth: 60cm 87 + height: 120cm 88 + 89 + # Compact with mixed indentation styles 90 + mixed_compact: 91 + databases: 92 + - type: postgresql 93 + connection: 94 + host: localhost 95 + port: 5432 96 + credentials: 97 + user: admin 98 + password: secret 99 + - type: mongodb 100 + connection: 101 + host: localhost 102 + port: 27017 103 + credentials: 104 + user: root 105 + password: root 106 + 107 + # Single-line compact entries 108 + single_line_compact: 109 + - {name: Alice, age: 25, role: developer} 110 + - {name: Bob, age: 30, role: designer} 111 + - {name: Charlie, age: 35, role: manager} 112 + 113 + # Compact notation with sequences as values 114 + sequences_in_compact: 115 + - title: Project A 116 + members: 117 + - Alice 118 + - Bob 119 + - Charlie 120 + tags: 121 + - urgent 122 + - backend 123 + - title: Project B 124 + members: 125 + - David 126 + - Eve 127 + tags: 128 + - frontend 129 + - design 130 + 131 + # Compact with empty values 132 + compact_with_empty: 133 + - id: 1 134 + data: [] 135 + meta: {} 136 + - id: 2 137 + data: 138 + - item1 139 + meta: 140 + key: value 141 + 142 + # Compact notation with complex nesting 143 + compact_complex_nesting: 144 + - level: 1 145 + children: 146 + - level: 2a 147 + children: 148 + - level: 3a 149 + value: leaf1 150 + - level: 3b 151 + value: leaf2 152 + - level: 2b 153 + children: 154 + - level: 3c 155 + value: leaf3 156 + 157 + # Real-world example: API endpoints 158 + api_endpoints: 159 + - path: /users 160 + method: GET 161 + auth: required 162 + params: 163 + - name: page 164 + type: integer 165 + default: 1 166 + - name: limit 167 + type: integer 168 + default: 10 169 + - path: /users/:id 170 + method: GET 171 + auth: required 172 + params: [] 173 + - path: /users 174 + method: POST 175 + auth: required 176 + body: 177 + username: string 178 + email: string 179 + password: string 180 + 181 + # Compact with various data types 182 + compact_types: 183 + - string_val: hello 184 + number_val: 42 185 + float_val: 3.14 186 + bool_val: true 187 + null_val: null 188 + - string_val: world 189 + number_val: 100 190 + float_val: 2.71 191 + bool_val: false 192 + null_val: ~ 193 + 194 + # Edge case: minimal compact notation 195 + minimal: 196 + - a: 1 197 + - b: 2 198 + - c: 3
+96
yaml/ocaml-yamle/tests/yaml/collections_flow.yml
··· 1 + # Flow Style Collections Test File 2 + # Testing various flow-style collection structures 3 + 4 + # Simple flow sequence 5 + simple_flow_sequence: [apple, banana, cherry, date] 6 + 7 + # Simple flow mapping 8 + simple_flow_mapping: {name: John, age: 30, city: New York} 9 + 10 + # Nested flow sequences 11 + nested_flow_sequences: [[a, b, c], [1, 2, 3], [red, green, blue]] 12 + 13 + # Nested flow mappings 14 + nested_flow_mappings: {person: {name: Alice, age: 25}, contact: {email: alice@example.com, phone: 555-1234}} 15 + 16 + # Flow sequence with mappings 17 + flow_seq_with_maps: [{name: Alice, role: dev}, {name: Bob, role: ops}, {name: Charlie, role: qa}] 18 + 19 + # Flow mapping with sequences 20 + flow_map_with_seqs: {colors: [red, green, blue], sizes: [S, M, L], numbers: [1, 2, 3]} 21 + 22 + # Deeply nested flow collections 23 + deep_flow_nesting: {level1: {level2: {level3: {level4: [a, b, c]}}}} 24 + 25 + # Empty flow collections 26 + empty_flow: {empty_seq: [], empty_map: {}, both: [[], {}]} 27 + 28 + # Mixed flow and block - flow in block 29 + flow_in_block: 30 + sequence: [1, 2, 3, 4, 5] 31 + mapping: {a: 1, b: 2, c: 3} 32 + nested: 33 + items: [x, y, z] 34 + config: {timeout: 30, retries: 3} 35 + 36 + # Mixed flow and block - block in flow 37 + block_in_flow: { 38 + users: [ 39 + {name: Alice, tags: [dev, senior]}, 40 + {name: Bob, tags: [ops, junior]} 41 + ] 42 + } 43 + 44 + # Complex mixed structure 45 + mixed_structure: 46 + services: 47 + - name: api 48 + ports: [8080, 8443] 49 + env: {DEBUG: true, LOG_LEVEL: info} 50 + - name: db 51 + ports: [5432] 52 + env: {POSTGRES_DB: mydb, POSTGRES_USER: admin} 53 + config: {version: 1.0, enabled: true} 54 + 55 + # Flow sequences with various types 56 + flow_types: 57 + strings: [hello, world, foo, bar] 58 + numbers: [1, 2, 3, 42, 100] 59 + mixed: [string, 123, true, false, null] 60 + quoted: ["with spaces", "special:chars", "commas, here"] 61 + 62 + # Flow mappings with various types 63 + flow_map_types: { 64 + string: value, 65 + number: 42, 66 + boolean: true, 67 + null_value: null, 68 + float: 3.14 69 + } 70 + 71 + # Nested mixed collections 72 + nested_mixed: 73 + - {id: 1, data: [a, b, c], meta: {type: first}} 74 + - {id: 2, data: [d, e, f], meta: {type: second}} 75 + - {id: 3, data: [g, h, i], meta: {type: third}} 76 + 77 + # Flow with multiline (should still be valid) 78 + multiline_flow: 79 + long_sequence: [ 80 + item1, 81 + item2, 82 + item3, 83 + item4 84 + ] 85 + long_mapping: { 86 + key1: value1, 87 + key2: value2, 88 + key3: value3 89 + } 90 + 91 + # Edge cases 92 + edge_cases: 93 + single_item_seq: [alone] 94 + single_item_map: {only: one} 95 + nested_empty: [[], [{}], [{}, []]] 96 + all_empty: [{}, [], {a: []}, {b: {}}]
+53
yaml/ocaml-yamle/tests/yaml/comments.yml
··· 1 + # Full line comment at the beginning 2 + # This is a YAML file testing comment handling 3 + 4 + # Comment before a mapping 5 + name: John Doe # End of line comment after a scalar value 6 + age: 30 # Another end of line comment 7 + 8 + # Comment between mapping entries 9 + address: 10 + # Comment inside nested mapping 11 + street: 123 Main St # End of line comment in nested value 12 + city: Springfield 13 + # Comment between nested entries 14 + zip: 12345 15 + 16 + # Comment before sequence 17 + items: 18 + - apple # Comment after sequence item 19 + - banana 20 + # Comment between sequence items 21 + - cherry 22 + - date # Last item comment 23 + 24 + # Comment before flow sequence 25 + flow_seq: [1, 2, 3] # Comment after flow sequence 26 + 27 + # Comment before flow mapping 28 + flow_map: {key1: value1, key2: value2} # Comment after flow mapping 29 + 30 + # Comments with various indentation levels 31 + nested: 32 + # Indented comment level 1 33 + level1: 34 + # Indented comment level 2 35 + level2: 36 + # Indented comment level 3 37 + value: deeply nested # End comment at depth 38 + 39 + # Multiple consecutive comments 40 + # Line 1 41 + # Line 2 42 + # Line 3 43 + multi_comment_key: value 44 + 45 + # Comment with special characters: !@#$%^&*() 46 + special: "value with # hash inside quotes" 47 + 48 + # Empty value with comment 49 + empty_value: # This key has no value (null) 50 + 51 + # Comment before document end 52 + final_key: final_value 53 + # Final comment at end of file
+8
yaml/ocaml-yamle/tests/yaml/directives.yml
··· 1 + # YAML directive tests 2 + 3 + # Test 1: %YAML 1.2 directive 4 + %YAML 1.2 5 + --- 6 + version: "1.2" 7 + content: This document uses YAML 1.2 8 + ...
+15
yaml/ocaml-yamle/tests/yaml/directives_multiple_tags.yml
··· 1 + # Test 4: Multiple TAG directives 2 + %YAML 1.2 3 + %TAG !e! tag:example.com,2025: 4 + %TAG !app! tag:myapp.org,2025:types: 5 + %TAG !geo! tag:geography.net,2025:shapes: 6 + --- 7 + user: !e!person 8 + name: Alice 9 + age: 30 10 + location: !geo!coordinates 11 + lat: 40.7128 12 + lon: -74.0060 13 + config: !app!settings 14 + debug: true 15 + timeout: 30
+10
yaml/ocaml-yamle/tests/yaml/directives_tag.yml
··· 1 + # Test 3: %TAG directive with custom prefix 2 + %YAML 1.2 3 + %TAG !custom! tag:example.com,2025: 4 + --- 5 + shape: !custom!circle 6 + radius: 5 7 + color: red 8 + point: !custom!point 9 + x: 10 10 + y: 20
+10
yaml/ocaml-yamle/tests/yaml/directives_yaml11.yml
··· 1 + # Test 2: %YAML 1.1 directive 2 + %YAML 1.1 3 + --- 4 + version: "1.1" 5 + content: This document uses YAML 1.1 6 + booleans: 7 + - yes 8 + - no 9 + - on 10 + - off
+15
yaml/ocaml-yamle/tests/yaml/documents_multi.yml
··· 1 + # Multiple document variations 2 + 3 + # Test 1: Two documents separated by --- 4 + --- 5 + document: first 6 + type: mapping 7 + data: 8 + key1: value1 9 + key2: value2 10 + --- 11 + document: second 12 + type: mapping 13 + data: 14 + key3: value3 15 + key4: value4
+10
yaml/ocaml-yamle/tests/yaml/documents_multi_empty.yml
··· 1 + # Test 4: Empty documents 2 + --- 3 + # Empty document (implicitly null) 4 + --- 5 + key: value 6 + --- 7 + # Another empty document 8 + --- 9 + - item1 10 + - item2
+15
yaml/ocaml-yamle/tests/yaml/documents_multi_three.yml
··· 1 + # Test 2: Three documents with different content types 2 + --- 3 + # First document: mapping 4 + name: John Doe 5 + age: 30 6 + city: New York 7 + --- 8 + # Second document: sequence 9 + - apple 10 + - banana 11 + - orange 12 + - grape 13 + --- 14 + # Third document: scalar 15 + This is a plain scalar document
+16
yaml/ocaml-yamle/tests/yaml/documents_multi_with_end.yml
··· 1 + # Test 3: Documents with explicit end markers 2 + --- 3 + first: 4 + document: data1 5 + value: 100 6 + ... 7 + --- 8 + second: 9 + document: data2 10 + value: 200 11 + ... 12 + --- 13 + third: 14 + document: data3 15 + value: 300 16 + ...
+11
yaml/ocaml-yamle/tests/yaml/documents_single.yml
··· 1 + # Single document variations 2 + 3 + # Test 1: Implicit document (no markers) 4 + key1: value1 5 + key2: value2 6 + nested: 7 + inner: data 8 + list: 9 + - item1 10 + - item2 11 + - item3
+11
yaml/ocaml-yamle/tests/yaml/documents_single_explicit_both.yml
··· 1 + # Test 3: Explicit start and end (--- ... ) 2 + --- 3 + key1: value1 4 + key2: value2 5 + nested: 6 + inner: data 7 + list: 8 + - item1 9 + - item2 10 + - item3 11 + ...
+10
yaml/ocaml-yamle/tests/yaml/documents_single_explicit_start.yml
··· 1 + # Test 2: Explicit start (---) 2 + --- 3 + key1: value1 4 + key2: value2 5 + nested: 6 + inner: data 7 + list: 8 + - item1 9 + - item2 10 + - item3
+11
yaml/ocaml-yamle/tests/yaml/documents_single_with_directive.yml
··· 1 + # Test 4: With %YAML directive 2 + %YAML 1.2 3 + --- 4 + key1: value1 5 + key2: value2 6 + nested: 7 + inner: data 8 + list: 9 + - item1 10 + - item2 11 + - item3
+155
yaml/ocaml-yamle/tests/yaml/edge_cases.yml
··· 1 + # Edge cases test file for YAML parsing 2 + 3 + # Case 1: Keys with colons (must be quoted) 4 + "key:with:colons": value 5 + "http://example.com": url_as_key 6 + "time:12:30": time_value 7 + 8 + # Case 2: Values starting with indicators (must be quoted or escaped) 9 + indicator_square: "[this starts with bracket]" 10 + indicator_curly: "{this starts with brace}" 11 + indicator_star: "*this starts with star" 12 + indicator_amp: "&this starts with ampersand" 13 + indicator_question: "?this starts with question" 14 + indicator_pipe: "|this starts with pipe" 15 + indicator_gt: ">this starts with gt" 16 + indicator_dash: "-this starts with dash" 17 + indicator_hash: "#this starts with hash" 18 + 19 + # Case 3: Special string values that look like other types 20 + string_true: "true" 21 + string_false: "false" 22 + string_null: "null" 23 + string_number: "123" 24 + string_float: "45.67" 25 + string_yes: "yes" 26 + string_no: "no" 27 + 28 + # Case 4: Actual special values 29 + bool_true: true 30 + bool_false: false 31 + null_value: null 32 + null_tilde: ~ 33 + number_int: 123 34 + number_float: 45.67 35 + number_exp: 1.23e4 36 + number_hex: 0x1F 37 + number_oct: 0o17 38 + 39 + # Case 5: Empty values 40 + empty_string: "" 41 + empty_list: [] 42 + empty_map: {} 43 + null_implicit: 44 + 45 + # Case 6: Very long lines 46 + very_long_key: "This is a very long value that contains a lot of text to test how the parser handles long lines. It should be able to handle lines that are much longer than typical lines in most YAML files. This continues for quite a while to make sure we test the boundaries of reasonable line lengths. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." 47 + 48 + very_long_literal: | 49 + This is a very long literal block that should preserve all the whitespace and newlines exactly as written. It can contain very long lines that go on and on and on without breaking. This tests whether the parser can handle long content in literal blocks properly. Lorem ipsum dolor sit amet, consectetur adipiscing elit. 50 + 51 + # Case 7: Unicode and special characters 52 + unicode_emoji: "Hello 🌍 World 🚀" 53 + unicode_chars: "Héllo Wörld 你好 مرحبا" 54 + unicode_key_🔑: unicode_value 55 + escaped_chars: "Line1\nLine2\tTabbed" 56 + 57 + # Case 8: Nested empty structures 58 + nested_empty: 59 + level1: {} 60 + level2: 61 + inner: [] 62 + level3: 63 + inner: 64 + deep: null 65 + 66 + # Case 9: Complex keys (flow collections as keys) 67 + ? [complex, key] 68 + : complex_value 69 + ? {nested: key} 70 + : another_value 71 + 72 + # Case 10: Multi-line keys and values 73 + ? | 74 + This is a multi-line 75 + key using literal block 76 + : | 77 + This is a multi-line 78 + value using literal block 79 + 80 + # Case 11: Quoted strings with escape sequences 81 + single_quoted: 'It''s a single-quoted string with doubled quotes' 82 + double_quoted: "It's a \"double-quoted\" string with escapes" 83 + backslash: "Path\\to\\file" 84 + newline_escape: "First line\nSecond line" 85 + 86 + # Case 12: Anchors and aliases at edge positions 87 + anchor_list: &anchor_ref 88 + - item1 89 + - item2 90 + - item3 91 + 92 + alias_usage: *anchor_ref 93 + 94 + nested_anchor: 95 + data: &nested_ref 96 + key: value 97 + reference: *nested_ref 98 + 99 + # Case 13: Mixed flow and block styles 100 + mixed_style: 101 + block_key: 102 + - flow_in_block: [1, 2, 3] 103 + - another: {a: 1, b: 2} 104 + flow_key: {block_in_flow: 105 + - item1 106 + - item2} 107 + 108 + # Case 14: Trailing commas in flow (typically invalid in YAML) 109 + # flow_trailing: [1, 2, 3,] # This would be invalid 110 + 111 + # Case 15: Strings that need quoting 112 + needs_quote_1: "value with # in it" 113 + needs_quote_2: "value with: colon" 114 + needs_quote_3: "value with @ at sign" 115 + needs_quote_4: "value with ` backtick" 116 + 117 + # Case 16: Multiple documents separator (not starting a new document) 118 + not_doc_separator: "--- this is just a string value" 119 + 120 + # Case 17: Extremely nested structures 121 + deeply_nested: 122 + l1: 123 + l2: 124 + l3: 125 + l4: 126 + l5: 127 + l6: 128 + l7: 129 + l8: 130 + l9: 131 + l10: "deep value" 132 + 133 + # Case 18: Large sequence 134 + large_sequence: 135 + - item_001 136 + - item_002 137 + - item_003 138 + - item_004 139 + - item_005 140 + - item_006 141 + - item_007 142 + - item_008 143 + - item_009 144 + - item_010 145 + 146 + # Case 19: Keys and values with only whitespace differences 147 + " key": "value with leading space in key" 148 + "key ": "value with trailing space in key" 149 + " spaced ": " spaced " 150 + 151 + # Case 20: Binary-looking values 152 + binary_string: "0b101010" 153 + hex_string: "0xDEADBEEF" 154 + 155 + # End of edge cases test file
+192
yaml/ocaml-yamle/tests/yaml/scalars_block.yml
··· 1 + # Block scalars - literal and folded styles 2 + --- 3 + # Literal style (|) - preserves newlines 4 + literal_basic: | 5 + Line one 6 + Line two 7 + Line three 8 + 9 + literal_with_indent: | 10 + First line 11 + Indented line 12 + More indented 13 + Back to second level 14 + Back to first level 15 + 16 + # Folded style (>) - converts newlines to spaces 17 + folded_basic: > 18 + This is a long paragraph 19 + that will be folded into 20 + a single line with the 21 + newlines converted to spaces. 22 + 23 + folded_paragraph: > 24 + First paragraph flows together 25 + into a single line. 26 + 27 + Second paragraph after blank line 28 + also flows together. 29 + 30 + # Chomping indicators 31 + # Strip (-) - removes trailing newlines 32 + literal_strip: |- 33 + No trailing newline 34 + 35 + 36 + literal_strip_multiple: |- 37 + Text here 38 + 39 + 40 + folded_strip: >- 41 + Folded text 42 + with stripped 43 + trailing newlines 44 + 45 + 46 + # Clip (default) - keeps single trailing newline 47 + literal_clip: | 48 + One trailing newline 49 + 50 + 51 + literal_clip_explicit: | 52 + This is the default behavior 53 + 54 + 55 + folded_clip: > 56 + Folded with one 57 + trailing newline 58 + 59 + 60 + # Keep (+) - preserves all trailing newlines 61 + literal_keep: |+ 62 + Keeps trailing newlines 63 + 64 + 65 + literal_keep_multiple: |+ 66 + Text here 67 + 68 + 69 + folded_keep: >+ 70 + Folded text 71 + keeps trailing 72 + 73 + 74 + # Explicit indentation indicators 75 + literal_indent_2: |2 76 + Two space indentation 77 + is preserved here 78 + Extra indent 79 + Back to two 80 + 81 + literal_indent_4: |4 82 + Four space base indent 83 + Second line 84 + Extra indent 85 + Back to base 86 + 87 + folded_indent_2: >2 88 + Text with two space 89 + base indentation that 90 + will be folded. 91 + 92 + folded_indent_3: >3 93 + Three space indent 94 + for this folded 95 + text block. 96 + 97 + # Combinations of indicators 98 + literal_indent_strip: |2- 99 + Indented by 2 100 + No trailing newlines 101 + 102 + 103 + folded_indent_strip: >3- 104 + Folded with indent 105 + and stripped end 106 + 107 + 108 + literal_indent_keep: |2+ 109 + Indented by 2 110 + Keeps trailing newlines 111 + 112 + 113 + folded_indent_keep: >4+ 114 + Folded indent 4 115 + keeps all trailing 116 + 117 + 118 + # Empty block scalars 119 + empty_literal: | 120 + 121 + empty_folded: > 122 + 123 + # Block scalar with only newlines 124 + only_newlines_literal: | 125 + 126 + 127 + only_newlines_folded: > 128 + 129 + 130 + # Complex indentation patterns 131 + complex_literal: | 132 + First level 133 + Second level 134 + Third level 135 + Back to second 136 + Back to first 137 + 138 + New paragraph 139 + With indent 140 + 141 + Final paragraph 142 + 143 + complex_folded: > 144 + This paragraph 145 + flows together. 146 + 147 + This is separate. 148 + This line starts more indented 149 + and continues. 150 + 151 + Final thoughts here. 152 + 153 + # Special characters in block scalars 154 + special_chars_literal: | 155 + Special: @#$%^&*() 156 + Quotes: "double" 'single' 157 + Brackets: [array] {object} 158 + Symbols: | > & * ? : - 159 + 160 + special_chars_folded: > 161 + All special chars are literal 162 + in block scalars: []{}|>*& 163 + 164 + # Block scalars in sequences 165 + sequence_with_blocks: 166 + - | 167 + First item 168 + literal block 169 + - > 170 + Second item 171 + folded block 172 + - |- 173 + Third item 174 + stripped 175 + - |+ 176 + Fourth item 177 + kept 178 + 179 + 180 + # Block scalars in nested mappings 181 + nested: 182 + description: > 183 + This is a folded 184 + description that spans 185 + multiple lines. 186 + code: | 187 + def hello(): 188 + print("Hello, World!") 189 + return True 190 + notes: |- 191 + Final notes 192 + with stripped end
+60
yaml/ocaml-yamle/tests/yaml/scalars_plain.yml
··· 1 + # Plain scalars - no quotes needed 2 + --- 3 + # Simple words 4 + simple_word: hello 5 + single_character: x 6 + number_like: 123 7 + boolean_like: true 8 + null_like: null 9 + 10 + # Multi-word values (no special meaning characters) 11 + sentence: this is a plain scalar 12 + phrase: plain scalars can have spaces 13 + 14 + # Numbers and special values that remain strings in context 15 + age: 42 16 + pi: 3.14159 17 + negative: -273 18 + scientific: 1.23e-4 19 + hex_like: 0x1A2B 20 + octal_like: 0o755 21 + 22 + # Special characters that are valid in plain scalars 23 + with_colon: "value: with colon needs quotes in value" 24 + with_comma: "commas, need quotes in flow context" 25 + with_hash: "# needs quotes if starting with hash" 26 + hyphen_start: "- needs quotes if starting like list" 27 + question_start: "? needs quotes if starting like mapping key" 28 + 29 + # Plain scalars with valid special characters 30 + email: user@example.com 31 + url: http://example.com/path 32 + path: /usr/local/bin 33 + ratio: 16:9 34 + version: v1.2.3 35 + 36 + # Multi-line plain scalars (line folding) 37 + # Newlines become spaces, blank lines become newlines 38 + folded_plain: This is a long 39 + plain scalar that spans 40 + multiple lines and will 41 + be folded into a single line 42 + with spaces. 43 + 44 + another_folded: First paragraph 45 + continues here and here. 46 + 47 + Second paragraph after blank line. 48 + Also continues. 49 + 50 + # Trailing and leading spaces are trimmed in plain scalars 51 + spaces_trimmed: value with spaces 52 + 53 + # Plain scalars can contain most punctuation 54 + punctuation: Hello, world! How are you? I'm fine. 55 + symbols: $100 & 50% off @ store #1 56 + math: 2+2=4 and 3*3=9 57 + 58 + # Empty plain scalar (becomes null) 59 + empty_implicit: 60 + explicit_empty: ""
+81
yaml/ocaml-yamle/tests/yaml/scalars_quoted.yml
··· 1 + # Quoted scalars - single and double quoted strings 2 + --- 3 + # Single-quoted strings 4 + single_simple: 'hello world' 5 + single_with_double: 'He said "hello"' 6 + single_escaped_quote: 'It''s a single quote: ''example''' 7 + single_multiline: 'This is a 8 + multi-line single 9 + quoted string' 10 + 11 + # Double-quoted strings 12 + double_simple: "hello world" 13 + double_with_single: "It's easy" 14 + double_escaped_quote: "She said \"hello\"" 15 + 16 + # Escape sequences in double-quoted strings 17 + escaped_newline: "Line one\nLine two\nLine three" 18 + escaped_tab: "Column1\tColumn2\tColumn3" 19 + escaped_backslash: "Path: C:\\Users\\Name" 20 + escaped_carriage: "Before\rAfter" 21 + escaped_bell: "Bell\a" 22 + escaped_backspace: "Back\b" 23 + escaped_formfeed: "Form\f" 24 + escaped_vertical: "Vertical\vtab" 25 + 26 + # Unicode escapes 27 + unicode_16bit: "Snowman: \u2603" 28 + unicode_32bit: "Emoji: \U0001F600" 29 + unicode_hex: "Null byte: \x00" 30 + 31 + # Empty strings 32 + empty_single: '' 33 + empty_double: "" 34 + 35 + # Strings that would be interpreted as other types if unquoted 36 + string_true: "true" 37 + string_false: "false" 38 + string_null: "null" 39 + string_number: "123" 40 + string_float: "45.67" 41 + string_octal: "0o755" 42 + string_hex: "0xFF" 43 + 44 + # Special YAML characters that need quoting 45 + starts_with_at: "@username" 46 + starts_with_backtick: "`command`" 47 + starts_with_ampersand: "&reference" 48 + starts_with_asterisk: "*alias" 49 + starts_with_exclamation: "!tag" 50 + starts_with_pipe: "|literal" 51 + starts_with_gt: ">folded" 52 + starts_with_percent: "%directive" 53 + 54 + # Flow indicators that need quoting 55 + with_brackets: "[not a list]" 56 + with_braces: "{not: a map}" 57 + with_comma: "a, b, c" 58 + with_colon_space: "key: value" 59 + 60 + # Quoted strings preserve leading/trailing whitespace 61 + leading_space: " spaces before" 62 + trailing_space: "spaces after " 63 + both_spaces: " spaces both " 64 + 65 + # Multi-line quoted strings 66 + double_multiline: "This is a string 67 + that spans multiple 68 + lines with escaped newlines." 69 + 70 + single_fold: 'This single quoted 71 + string will fold 72 + lines into spaces.' 73 + 74 + # Complex escape sequences 75 + complex_escapes: "Tab:\t Newline:\n Quote:\" Backslash:\\ Unicode:\u0041" 76 + 77 + # Edge cases 78 + only_spaces_single: ' ' 79 + only_spaces_double: " " 80 + only_newlines: "\n\n\n" 81 + mixed_quotes: "She said 'it''s a beautiful day'"
+82
yaml/ocaml-yamle/tests/yaml/values_bool.yml
··· 1 + # Boolean value test cases for YAML 1.2 2 + # Note: YAML 1.2 only recognizes 'true' and 'false' as booleans 3 + # Other values like yes/no, on/off are treated as strings in 1.2 4 + 5 + # Standard YAML 1.2 booleans (lowercase) 6 + bool_true: true 7 + bool_false: false 8 + 9 + # Capitalized forms (should be strings in YAML 1.2) 10 + capitalized_true: True 11 + capitalized_false: False 12 + 13 + # YAML 1.1 style booleans (should be strings in YAML 1.2) 14 + yes_value: yes 15 + no_value: no 16 + Yes_value: Yes 17 + No_value: No 18 + YES_value: YES 19 + NO_value: NO 20 + 21 + # On/Off style (should be strings in YAML 1.2) 22 + on_value: on 23 + off_value: off 24 + On_value: On 25 + Off_value: Off 26 + ON_value: ON 27 + OFF_value: OFF 28 + 29 + # Booleans in sequences 30 + bool_sequence: 31 + - true 32 + - false 33 + - yes 34 + - no 35 + - on 36 + - off 37 + 38 + # Booleans in flow style 39 + flow_bools: [true, false, yes, no] 40 + 41 + # Booleans in mappings 42 + bool_mapping: 43 + active: true 44 + disabled: false 45 + enabled: yes 46 + stopped: no 47 + 48 + # String literals that should NOT be parsed as booleans 49 + quoted_bools: 50 + quoted_true: "true" 51 + quoted_false: "false" 52 + quoted_yes: "yes" 53 + quoted_no: "no" 54 + single_true: 'true' 55 + single_false: 'false' 56 + 57 + # Nested boolean values 58 + nested_bools: 59 + settings: 60 + debug: true 61 + verbose: false 62 + legacy_yes: yes 63 + legacy_no: no 64 + flags: 65 + - true 66 + - false 67 + - on 68 + - off 69 + 70 + # Mixed case variations 71 + mixed_case: 72 + TRUE: TRUE 73 + FALSE: FALSE 74 + TrUe: TrUe 75 + FaLsE: FaLsE 76 + 77 + # Boolean-like strings that should remain strings 78 + bool_like_strings: 79 + truthy: truely 80 + falsy: falsetto 81 + yes_sir: yessir 82 + no_way: noway
+55
yaml/ocaml-yamle/tests/yaml/values_null.yml
··· 1 + # Null value test cases for YAML 1.2 2 + 3 + # Explicit null keyword 4 + explicit_null: null 5 + 6 + # Tilde shorthand for null 7 + tilde_null: ~ 8 + 9 + # Empty value (implicit null) 10 + empty_null: 11 + 12 + # Null in flow style 13 + flow_null: [null, ~, ] 14 + 15 + # Null in sequences 16 + sequence_nulls: 17 + - null 18 + - ~ 19 + - 20 + - explicit: null 21 + - tilde: ~ 22 + - empty: 23 + 24 + # Null in mappings 25 + mapping_nulls: 26 + key1: null 27 + key2: ~ 28 + key3: 29 + 30 + # Null as key 31 + null: "null key with string value" 32 + ~: "tilde key with string value" 33 + 34 + # Mixed null values in nested structures 35 + nested: 36 + level1: 37 + null_value: null 38 + tilde_value: ~ 39 + empty_value: 40 + list: 41 + - null 42 + - ~ 43 + - 44 + - some_value 45 + map: 46 + a: null 47 + b: ~ 48 + c: 49 + 50 + # String literals that contain "null" (should NOT be parsed as null) 51 + string_nulls: 52 + quoted_null: "null" 53 + quoted_tilde: "~" 54 + null_in_string: "this is null" 55 + word_null: 'null'
+120
yaml/ocaml-yamle/tests/yaml/values_numbers.yml
··· 1 + # Numeric value test cases for YAML 1.2 2 + 3 + # Integers 4 + int_zero: 0 5 + int_positive: 42 6 + int_negative: -17 7 + int_large: 1000000 8 + int_with_underscores: 1_000_000 9 + 10 + # Octal notation (YAML 1.2 style with 0o prefix) 11 + octal_value: 0o14 12 + octal_zero: 0o0 13 + octal_large: 0o777 14 + 15 + # Hexadecimal notation 16 + hex_lowercase: 0x1a 17 + hex_uppercase: 0x1A 18 + hex_mixed: 0xDeadBeef 19 + hex_zero: 0x0 20 + 21 + # Floating point numbers 22 + float_simple: 3.14 23 + float_negative: -0.5 24 + float_zero: 0.0 25 + float_leading_dot: .5 26 + float_trailing_zero: 1.0 27 + 28 + # Scientific notation 29 + scientific_positive: 1.0e10 30 + scientific_negative: 1.5e-3 31 + scientific_uppercase: 2.5E+2 32 + scientific_no_sign: 3.0e5 33 + 34 + # Special floating point values 35 + positive_infinity: .inf 36 + negative_infinity: -.inf 37 + not_a_number: .nan 38 + infinity_upper: .Inf 39 + infinity_caps: .INF 40 + nan_upper: .NaN 41 + nan_caps: .NAN 42 + 43 + # Numbers in sequences 44 + number_sequence: 45 + - 0 46 + - 42 47 + - -17 48 + - 3.14 49 + - 1.0e10 50 + - .inf 51 + - .nan 52 + 53 + # Numbers in flow style 54 + flow_numbers: [0, 42, -17, 3.14, 0x1A, 0o14] 55 + 56 + # Numbers in mappings 57 + number_mapping: 58 + count: 100 59 + price: 19.99 60 + discount: -5.0 61 + hex_color: 0xFF5733 62 + octal_perms: 0o755 63 + scientific: 6.022e23 64 + 65 + # String literals that look like numbers (quoted) 66 + quoted_numbers: 67 + string_int: "42" 68 + string_float: "3.14" 69 + string_hex: "0x1A" 70 + string_octal: "0o14" 71 + string_inf: ".inf" 72 + string_nan: ".nan" 73 + 74 + # Numeric strings that should remain strings 75 + numeric_strings: 76 + phone: 555-1234 77 + version: 1.2.3 78 + code: 00123 79 + leading_zero: 007 80 + plus_sign: +123 81 + 82 + # Edge cases 83 + edge_cases: 84 + min_int: -9223372036854775808 85 + max_int: 9223372036854775807 86 + very_small: 1.0e-100 87 + very_large: 1.0e100 88 + negative_zero: -0.0 89 + positive_zero: +0.0 90 + 91 + # Nested numeric values 92 + nested_numbers: 93 + coordinates: 94 + x: 10.5 95 + y: -20.3 96 + z: 0.0 97 + measurements: 98 + - 1.1 99 + - 2.2 100 + - 3.3 101 + stats: 102 + count: 1000 103 + average: 45.67 104 + max: .inf 105 + min: -.inf 106 + 107 + # YAML 1.1 style octals (no 0o prefix) - should be strings in YAML 1.2 108 + legacy_octal: 014 109 + 110 + # Binary notation (not part of YAML 1.2 core, but sometimes supported) 111 + # These should be treated as strings in strict YAML 1.2 112 + binary_like: 0b1010 113 + 114 + # Numbers with various formats 115 + format_tests: 116 + no_decimal: 42 117 + with_decimal: 42.0 118 + leading_zero_decimal: 0.42 119 + no_leading_digit: .42 120 + trailing_decimal: 42.
+101
yaml/ocaml-yamle/tests/yaml/values_timestamps.yml
··· 1 + # Timestamp value test cases for YAML 1.1 2 + # Note: YAML 1.2 does not have a timestamp type in the core schema 3 + # These are recognized in YAML 1.1 and some extended schemas 4 + 5 + # ISO 8601 date format (YYYY-MM-DD) 6 + date_simple: 2001-12-15 7 + date_earliest: 1970-01-01 8 + date_leap_year: 2020-02-29 9 + date_current: 2025-12-04 10 + 11 + # ISO 8601 datetime with timezone (UTC) 12 + datetime_utc: 2001-12-15T02:59:43.1Z 13 + datetime_utc_full: 2001-12-15T02:59:43.123456Z 14 + datetime_utc_no_frac: 2001-12-15T02:59:43Z 15 + 16 + # ISO 8601 datetime with timezone offset 17 + datetime_offset_pos: 2001-12-15T02:59:43.1+05:30 18 + datetime_offset_neg: 2001-12-15T02:59:43.1-05:00 19 + datetime_offset_hours: 2001-12-15T02:59:43+05 20 + 21 + # Spaced datetime format (YAML 1.1 style) 22 + datetime_spaced: 2001-12-14 21:59:43.10 -5 23 + datetime_spaced_utc: 2001-12-15 02:59:43.1 Z 24 + datetime_spaced_offset: 2001-12-14 21:59:43.10 -05:00 25 + 26 + # Datetime without fractional seconds 27 + datetime_no_frac: 2001-12-15T14:30:00Z 28 + 29 + # Date only (no time component) 30 + date_only: 2001-12-15 31 + 32 + # Various formats 33 + timestamp_formats: 34 + iso_date: 2001-12-15 35 + iso_datetime_z: 2001-12-15T02:59:43Z 36 + iso_datetime_offset: 2001-12-15T02:59:43+00:00 37 + spaced_datetime: 2001-12-14 21:59:43.10 -5 38 + canonical: 2001-12-15T02:59:43.1Z 39 + 40 + # Timestamps in sequences 41 + timestamp_sequence: 42 + - 2001-12-15 43 + - 2001-12-15T02:59:43.1Z 44 + - 2001-12-14 21:59:43.10 -5 45 + - 2025-01-01T00:00:00Z 46 + 47 + # Timestamps in mappings 48 + events: 49 + created: 2001-12-15T02:59:43.1Z 50 + modified: 2001-12-16T10:30:00Z 51 + published: 2001-12-14 21:59:43.10 -5 52 + 53 + # String literals that look like timestamps (quoted) 54 + quoted_timestamps: 55 + string_date: "2001-12-15" 56 + string_datetime: "2001-12-15T02:59:43.1Z" 57 + string_spaced: "2001-12-14 21:59:43.10 -5" 58 + 59 + # Edge cases and variations 60 + edge_cases: 61 + midnight: 2001-12-15T00:00:00Z 62 + end_of_day: 2001-12-15T23:59:59Z 63 + microseconds: 2001-12-15T02:59:43.123456Z 64 + no_seconds: 2001-12-15T02:59Z 65 + hour_only: 2001-12-15T02Z 66 + 67 + # Nested timestamp values 68 + nested_timestamps: 69 + project: 70 + start_date: 2001-12-15 71 + milestones: 72 + - date: 2001-12-20 73 + time: 2001-12-20T14:00:00Z 74 + - date: 2002-01-15 75 + time: 2002-01-15T09:30:00-05:00 76 + metadata: 77 + created: 2001-12-14 21:59:43.10 -5 78 + updated: 2001-12-15T02:59:43.1Z 79 + 80 + # Invalid timestamp formats (should be treated as strings) 81 + invalid_timestamps: 82 + bad_date: 2001-13-45 83 + bad_time: 2001-12-15T25:99:99Z 84 + incomplete: 2001-12 85 + no_leading_zero: 2001-1-5 86 + 87 + # Different timezone representations 88 + timezones: 89 + utc_z: 2001-12-15T02:59:43Z 90 + utc_offset: 2001-12-15T02:59:43+00:00 91 + est: 2001-12-14T21:59:43-05:00 92 + ist: 2001-12-15T08:29:43+05:30 93 + jst: 2001-12-15T11:59:43+09:00 94 + 95 + # Historical and future dates 96 + date_range: 97 + past: 1900-01-01 98 + unix_epoch: 1970-01-01T00:00:00Z 99 + y2k: 2000-01-01T00:00:00Z 100 + present: 2025-12-04 101 + future: 2099-12-31T23:59:59Z
+105
yaml/ocaml-yamle/tests/yaml/whitespace.yml
··· 1 + # Whitespace handling test file 2 + 3 + # Section 1: Different indentation levels (2 spaces) 4 + two_space_indent: 5 + level1: 6 + level2: 7 + level3: value 8 + 9 + # Section 2: Four space indentation 10 + four_space_indent: 11 + level1: 12 + level2: 13 + level3: value 14 + 15 + # Section 3: Mixed content with blank lines 16 + 17 + first_key: first_value 18 + 19 + 20 + second_key: second_value 21 + 22 + 23 + 24 + third_key: third_value 25 + 26 + # Section 4: Sequences with varying indentation 27 + sequence_2space: 28 + - item1 29 + - item2 30 + - nested: 31 + - nested_item1 32 + - nested_item2 33 + 34 + sequence_4space: 35 + - item1 36 + - item2 37 + - nested: 38 + - nested_item1 39 + - nested_item2 40 + 41 + # Section 5: Trailing whitespace (spaces after values - invisible but present) 42 + trailing_spaces: value 43 + another_key: another_value 44 + 45 + # Section 6: Leading whitespace preservation in literals 46 + literal_block: | 47 + This is a literal block 48 + with preserved indentation 49 + including extra spaces 50 + and blank lines 51 + 52 + like this one above 53 + 54 + folded_block: > 55 + This is a folded block 56 + that will be folded into 57 + a single line but preserves 58 + 59 + paragraph breaks like above 60 + 61 + # Section 7: Whitespace in flow collections 62 + flow_with_spaces: [ item1 , item2 , item3 ] 63 + flow_tight: [item1,item2,item3] 64 + flow_map_spaces: { key1: value1 , key2: value2 } 65 + flow_map_tight: {key1:value1,key2:value2} 66 + 67 + # Section 8: Multiple consecutive blank lines between top-level keys 68 + key_before_blanks: value1 69 + 70 + 71 + 72 + 73 + key_after_blanks: value2 74 + 75 + # Section 9: Indentation in mappings 76 + mapping_indent: 77 + key1: value1 78 + key2: value2 79 + nested: 80 + nested_key1: nested_value1 81 + nested_key2: nested_value2 82 + deep_nested: 83 + deep_key: deep_value 84 + 85 + # Section 10: Whitespace around colons and hyphens 86 + no_space_colon:value 87 + space_after_colon: value 88 + spaces_around: value 89 + - sequence_item_no_space 90 + - nested_sequence 91 + 92 + # Section 11: Empty lines in sequences 93 + sequence_with_blanks: 94 + - item1 95 + 96 + - item2 97 + 98 + - item3 99 + 100 + # Section 12: Whitespace-only mapping values (implicit null) 101 + explicit_null: null 102 + implicit_null: 103 + space_only: 104 + 105 + # End of whitespace test file