···11-Anchor and Alias Support (currently not supported)
22-33-These tests document anchor (&) and alias (*) support that is not yet
44-implemented. Currently, aliases fail with "unresolved alias" error.
55-66-Test: Simple scalar anchor and alias
77-88- $ echo 'anchor: &anc value
99- > alias: *anc' | yamlcat 2>&1
1010- anchor: value
1111- alias: value
1212-1313-Test: Numeric anchor and alias
1414-1515- $ echo 'original: &num 42
1616- > copy: *num' | yamlcat 2>&1
1717- original: 42
1818- copy: 42
1919-2020-Test: Sequence anchor and alias
2121-2222- $ echo 'list: &items
2323- > - one
2424- > - two
2525- > copy: *items' | yamlcat 2>&1
2626- list:
2727- - one
2828- - two
2929- copy:
3030- - one
3131- - two
3232-3333-Test: Mapping anchor and alias
3434-3535- $ echo 'person: &p
3636- > name: Alice
3737- > age: 30
3838- > copy: *p' | yamlcat 2>&1
3939- person:
4040- name: Alice
4141- age: 30
4242- copy:
4343- name: Alice
4444- age: 30
4545-4646-Test: Multiple aliases to same anchor
4747-4848- $ echo 'value: &v 100
4949- > first: *v
5050- > second: *v
5151- > third: *v' | yamlcat 2>&1
5252- value: 100
5353- first: 100
5454- second: 100
5555- third: 100
5656-5757-Test: Anchor in flow context
5858-5959- $ echo '[&item apple, *item]' | yamlcat 2>&1
6060- - apple
6161- - apple
6262-6363-Test: Anchor with mapping in flow
6464-6565- $ echo '{original: &cfg {a: 1}, copy: *cfg}' | yamlcat 2>&1
6666- original:
6767- a: 1
6868- copy:
6969- a: 1
7070-7171-Test: Anchors file from test suite
7272-7373- $ yamlcat ../yaml/anchors_basic.yml 2>&1
7474- Error: multiple documents found when single expected
7575- [1]
7676-7777- $ yamlcat ../yaml/anchors_merge.yml 2>&1
7878- Error: multiple documents found when single expected
7979- [1]
8080-8181-Note: The anchor test files also use multiple documents, so they fail
8282-with multi-document errors before even hitting anchor issues.
-56
yaml/ocaml-yamle/tests/cram/failing_empty.t
···11-Empty Collection YAML Emission (currently outputs nothing instead of [] or {})
22-33-These tests document the empty collection emission issue where empty
44-sequences and mappings are emitted as nothing (interpreted as null)
55-instead of [] or {} in YAML output.
66-77-Note: JSON output correctly shows [] and {} for empty collections.
88-The issue is only with YAML-format output.
99-1010-Test: Empty sequence emits as nothing instead of []
1111-1212- $ echo 'empty_seq: []' | yamlcat
1313- empty_seq: []
1414-1515-The above outputs just "empty_seq:" with nothing after it.
1616-Expected output should be: empty_seq: []
1717-1818-Test: Empty mapping emits as nothing instead of {}
1919-2020- $ echo 'empty_map: {}' | yamlcat
2121- empty_map: {}
2222-2323-Test: Multiple empty collections
2424-2525- $ echo 'seq: []
2626- > map: {}
2727- > data: value' | yamlcat
2828- seq: []
2929- map: {}
3030- data: value
3131-3232-Test: Nested empty collections
3333-3434- $ echo 'outer:
3535- > inner_seq: []
3636- > inner_map: {}' | yamlcat
3737- outer:
3838- inner_seq: []
3939- inner_map: {}
4040-4141-Test: Empty collection in sequence
4242-4343- $ echo 'items:
4444- > - first
4545- > - []
4646- > - third' | yamlcat
4747- items:
4848- - first
4949- - []
5050- - third
5151-5252-Test: Verify JSON output is correct (for comparison)
5353-5454- $ echo 'empty_seq: []
5555- > empty_map: {}' | yamlcat --json
5656- {"empty_seq": [], "empty_map": {}}
-73
yaml/ocaml-yamle/tests/cram/failing_multidoc.t
···11-Multi-document stream support (currently not supported)
22-33-These tests document expected behavior for multi-document YAML streams.
44-They currently fail with "multiple documents found when single expected".
55-66-Test: Two documents separated by ---
77-88- $ echo '---
99- > first: document
1010- > ---
1111- > second: document' | yamlcat 2>&1
1212- Error: multiple documents found when single expected
1313- [1]
1414-1515-Test: Three documents with different types
1616-1717- $ echo '---
1818- > mapping: value
1919- > ---
2020- > - sequence
2121- > - items
2222- > ---
2323- > scalar value' | yamlcat 2>&1
2424- Error: multiple documents found when single expected
2525- [1]
2626-2727-Test: Documents with explicit end markers
2828-2929- $ echo '---
3030- > doc1: value
3131- > ...
3232- > ---
3333- > doc2: value
3434- > ...' | yamlcat 2>&1
3535- Error: multiple documents found when single expected
3636- [1]
3737-3838-Test: Empty documents
3939-4040- $ echo '---
4141- > ---
4242- > content: here
4343- > ---' | yamlcat 2>&1
4444- Error: multiple documents found when single expected
4545- [1]
4646-4747-Test: Multi-document file
4848-4949- $ yamlcat ../yaml/documents_multi.yml 2>&1
5050- Error: multiple documents found when single expected
5151- [1]
5252-5353- $ yamlcat ../yaml/documents_multi_three.yml 2>&1
5454- Error: multiple documents found when single expected
5555- [1]
5656-5757- $ yamlcat ../yaml/documents_multi_with_end.yml 2>&1
5858- Error: multiple documents found when single expected
5959- [1]
6060-6161- $ yamlcat ../yaml/documents_multi_empty.yml 2>&1
6262- Error: multiple documents found when single expected
6363- [1]
6464-6565-Test: Anchors file (uses multiple documents)
6666-6767- $ yamlcat ../yaml/anchors_basic.yml 2>&1
6868- Error: multiple documents found when single expected
6969- [1]
7070-7171- $ yamlcat ../yaml/anchors_merge.yml 2>&1
7272- Error: multiple documents found when single expected
7373- [1]
-63
yaml/ocaml-yamle/tests/cram/failing_tags.t
···11-Tag Shorthand Support (currently not supported)
22-33-These tests document YAML tag shorthand (!!) support that is not yet
44-implemented. Currently, tags are parsed as part of plain scalar content.
55-66-Test: String tag shorthand
77-88- $ echo '!!str 123' | yamlcat
99- '123'
1010-1111-Expected: 123 (as a string)
1212-1313-Test: Integer tag shorthand
1414-1515- $ echo '!!int "42"' | yamlcat
1616- 42
1717-1818-Expected: 42
1919-2020-Test: Boolean tag shorthand
2121-2222- $ echo '!!bool "yes"' | yamlcat
2323- true
2424-2525-Expected: true
2626-2727-Test: Null tag shorthand
2828-2929- $ echo '!!null ""' | yamlcat
3030- null
3131-3232-Expected: null
3333-3434-Test: Float tag shorthand
3535-3636- $ echo '!!float 3.14' | yamlcat
3737- 3.14
3838-3939-Expected: 3.14
4040-4141-Test: Tag shorthand in mapping value
4242-4343- $ echo 'value: !!str 42' | yamlcat
4444- value: '42'
4545-4646-Expected: value: "42" (string representation)
4747-4848-Test: Local tags
4949-5050- $ echo '!local_tag value' | yamlcat
5151- value
5252-5353-Expected: value (with local tag applied)
5454-5555-Test: Verbatim tags
5656-5757- $ echo '!<tag:example.com:type> value' | yamlcat
5858- value
5959-6060-Expected: value (with verbatim tag applied)
6161-6262-Note: Tags are being parsed as literal text in the scalar value,
6363-with exclamation marks escaped in the output.
···11+Tag Support Tests
22+33+These tests verify YAML tag support including type coercion and
44+different tag formats.
55+66+Test: String tag shorthand
77+88+ $ printf '!!str 123' | yamlcat
99+ '123'
1010+1111+The !!str tag forces the value to be treated as a string.
1212+1313+Test: Integer tag shorthand
1414+1515+ $ printf '!!int "42"' | yamlcat
1616+ 42
1717+1818+The !!int tag coerces the quoted string to an integer.
1919+2020+Test: Boolean tag shorthand
2121+2222+ $ printf '!!bool "yes"' | yamlcat
2323+ true
2424+2525+The !!bool tag coerces the string to a boolean.
2626+2727+Test: Null tag shorthand
2828+2929+ $ printf '!!null ""' | yamlcat
3030+ null
3131+3232+The !!null tag coerces the value to null.
3333+3434+Test: Float tag shorthand
3535+3636+ $ printf '!!float 3.14' | yamlcat
3737+ 3.14
3838+3939+The !!float tag specifies a floating-point number.
4040+4141+Test: Tag shorthand in mapping value
4242+4343+ $ printf 'value: !!str 42' | yamlcat
4444+ value: '42'
4545+4646+Tags work in mapping values and force type coercion.
4747+4848+Test: Local tags
4949+5050+ $ printf '!local_tag value' | yamlcat
5151+ value
5252+5353+Local tags (single !) are treated as unknown and default to string type.
5454+5555+Test: Verbatim tags
5656+5757+ $ printf '!<tag:example.com:type> value' | yamlcat
5858+ value
5959+6060+Verbatim tags (!<...>) are treated as unknown and default to string type.