{"id":13484635,"url":"https://github.com/yaml/yaml-test-suite","last_synced_at":"2025-10-04T06:07:05.376Z","repository":{"id":40257419,"uuid":"75962129","full_name":"yaml/yaml-test-suite","owner":"yaml","description":"Comprehensive, language independent Test Suite for YAML","archived":false,"fork":false,"pushed_at":"2024-07-04T15:23:20.000Z","size":4557,"stargazers_count":206,"open_issues_count":43,"forks_count":66,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-03-30T18:09:26.568Z","etag":null,"topics":["test-suite","testing","yaml"],"latest_commit_sha":null,"homepage":"","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yaml.png","metadata":{"files":{"readme":"ReadMe.md","changelog":null,"contributing":null,"funding":null,"license":"License","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-08T17:59:39.000Z","updated_at":"2025-03-21T00:03:12.000Z","dependencies_parsed_at":"2024-04-24T20:00:45.431Z","dependency_job_id":"feac25e7-eacd-473c-839a-eddf920392c0","html_url":"https://github.com/yaml/yaml-test-suite","commit_stats":{"total_commits":415,"total_committers":10,"mean_commits":41.5,"dds":0.5518072289156626,"last_synced_commit":"ccfa74e56afb53da960847ff6e6976c0a0825709"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaml%2Fyaml-test-suite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaml%2Fyaml-test-suite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaml%2Fyaml-test-suite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaml%2Fyaml-test-suite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yaml","download_url":"https://codeload.github.com/yaml/yaml-test-suite/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247543593,"owners_count":20955865,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["test-suite","testing","yaml"],"created_at":"2024-07-31T17:01:27.863Z","updated_at":"2025-10-04T06:07:00.352Z","avatar_url":"https://github.com/yaml.png","language":"Perl","funding_links":[],"categories":["Perl","Specification"],"sub_categories":["YAML is a **supserset of JSON**"],"readme":"YAML Test Suite\n===============\n\nComprehensive Test Suite for YAML\n\n## Overview\n\nThis repository contains data for testing the correctness of YAML processors.\n\nThe types of data include:\n\n* Metadata about the test\n  * Name (short phrase)\n  * Tags\n  * Description\n* Input YAML\n* Canonical output YAML\n* Matching JSON\n* Token stream notation\n* Event stream notation\n* Error data\n* etc\n\nTo get a quick overview of the tests you can have a look at the [YAML Test\nMatrix](http://matrix.yaml.info/), made from\n\u003chttps://github.com/perlpunk/yaml-test-matrix\u003e.\n\nYou can also view the latest test results from 15 different parsers in\n[this Google sheet](https://tinyurl.com/2p97ah8a).\n\n## Usage\n\nThe tests are available in 2 forms.\nFiles in the `src` directory encode all the data for YAML using YAML.\nThe data from these tests is also available in a form where each test\nhas its own directory.\n\nFor that, use the latest data release under\n[https://github.com/yaml/yaml-test-suite/releases](\nhttps://github.com/yaml/yaml-test-suite/releases):\n\n    git clone https://github.com/yaml/yaml-test-suite -b data-YYYY-MM-DD\n\nThere are tests which have multiple similar subtests. Those subtests are\nin their own numeric directories under the parent id, e.g.:\n\n    VJP3/\n    VJP3/00\n    VJP3/00/===\n    VJP3/00/error\n    VJP3/00/in.yaml\n    VJP3/00/test.event\n    VJP3/01\n    ...\n\n\nThe releases are made from the `data` branch, which is made from the data in\nthe YAML in the `main` branch.\nYou shouldn't use the data branch directly as the branch contains unreleased\ncommits which might be wrong, and it is squashed and force pushed from time to\ntime.\n\n### Special Characters\n\nThe YAML files use a number of non-ascii unicode characters to indicate the\npresence of certain characters that would be otherwise hard to read.\n\n* `␣` is used for trailing space characters\n* Hard tabs are reresented by one of:  (expanding to 4 spaces)\n  * `———»`\n  * `——»`\n  * `—»`\n  * `»`\n* `↵` us used to show trailing newline characters\n* `∎` is used at the end when there is no final newline character\n* `←` indicates a carriage return character\n* `⇔` indicates a byte order mark (BOM) character\n\nAlso these are used in test event output:\n\n* `\u003cSPC\u003e` for a space character\n* `\u003cTAB\u003e` for a tab character\n\n## The `data` branch files\n\nThe YAML test files in the `src/` dir are turned into data files in the `data`\nbranch.\nThe `make data-update` command generates the `data` branch files under the\n`./data/` directory.\nFor instance, a file `src/AB3D.yaml` will generate a `data/AB3D/` directory.\n\nA YAML test file can have 1 or more tests.\nOriginally each file had one test, and all the data files were under\n`data/AB3D/`.\nIf a YAML test file has more than one test, subdirectories are created:\n`data/AB3D/00/`, `data/AB3D/01/`, `data/AB3D/02/`, etc.\n\nThe test files are:\n\n* `===` -- The name/label of the test\n* `in.yaml` -- The YAML input to be parsed or loaded\n* `test.event` -- The event DSL produced by the parser test program\n* `in.json` -- The JSON value that shoiuld load the same as `in.yaml`\n* `out.yaml` -- The most normal output a dumper would produce\n* `error` -- This file indicates the YAML should fail to parse\n* `emit.yaml` -- Output an emitter would produce\n\n## Makefile Targets\n\nThe Makefile has a number of targets for automating the process of adding new\ntests and also preprocessing them into the `data` branch.\n\n* `make data`\n\n  Create a `data` worktree subdirectory with all the tests as data files.\n\n* `make data-update`\n\n  Update the `data` branch directory with the latest info in the `src`\n  directory.\n\n* `make export`\n\n  Creates an `export.tsv` file with all the data from the `src` test files.\n  This tsv data can be copied into a google spreadsheet.\n  The [YAML parser playground](https://play.yaml.io/main/parser) has a button\n  to copy a test to the same tsv form.\n\n* `make import`\n\n  Make a directory called `new` from a file named `import.tsv`.\n  The `import.tsv` file should have data copied from a google spreadsheet.\n\n* `make add-new`\n\n  Copy the new tests under `new/` into `src/` to make a PR for new tests.\n\n* `make testml`\n\n  Generate `.tml` files under a `testml/` directory for all the suite tests.\n\n* `make clean`\n\n  Remove generated files and directories.\n\n## Libaries using this test suite\n\n* C\n  * [libyaml](https://github.com/yaml/libyaml)\n  * [libfyaml](https://github.com/pantoniou/libfyaml)\n* C++\n  * [rapidyaml](https://github.com/biojppm/rapidyaml)\n* C#\n  * [YamlDotNet](https://github.com/aaubry/YamlDotNet)\n* D\n  * [dyaml](https://github.com/dlang-community/D-YAML)\n* Delphi\n  * [Neslib.Yaml](https://github.com/neslib/Neslib.Yaml)\n* Haskell\n  * [HsYAML](https://github.com/haskell-hvr/HsYAML)\n* Java\n  * [SnakeYAML Engine](https://bitbucket.org/asomov/snakeyaml-engine)\n* Javascript\n  * [yaml](https://github.com/eemeli/yaml)\n* Nim\n  * [NimYAML](https://github.com/flyx/NimYAML)\n* Perl 5\n  * [YAML::PP](https://github.com/perlpunk/YAML-PP-p5)\n* Scala\n  * [Scala-Yaml](https://github.com/VirtusLab/scala-yaml)\n\nIf your library is using the test suite, drop us a line and we can add it here.\nIt would also be nice if you could add a link back to this test suite.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyaml%2Fyaml-test-suite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyaml%2Fyaml-test-suite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyaml%2Fyaml-test-suite/lists"}