What implementation-independent test file formats exist for language tooling? - eviltoast

At some point in a programming language’s life the community will want to pursue standardization. In my mind this idea is bound with multiple implementations of the language’s toolset - the lexer, parser, semantic analyzer, type checker, and so forth. A large implementation-independent test corpus is an important component of standardization, to ensure conformance of an implementation to an abstract standard. The corpus contains basic tests for all language constructs along with all the weird syntactic or semantic edge cases that nobody would ever think of when reading the language standard. Since many programming languages exist and all face this issue, I would like to ask - what file formats have been developed for these test corpora? I currently only know of one example, which is the file format used for syntax-level tests by <a href=“https://tree-sitter.github.io/tree-sitter/creating-parsers#command-test” rel=“ugc”>tree-sitter</a>. This is a text file with flexibly-defined separators delineating a series of text inputs along with the expected parse tree as an S-expression. We have adapted these tests to run against multiple implementations of the TLA+ syntax parser, but are now considering what such a format might look like for semantic tests (where you want to assert one identifier refers to another) or type tests (where you want to assert a given subexpression has some type).